opf/openproject

View on GitHub
frontend/src/app/core/setup/init-locale.ts

Summary

Maintainability
A
1 hr
Test Coverage

Function initializeLocale has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function initializeLocale() {
  const meta = document.querySelector<HTMLMetaElement>('meta[name=openproject_initializer]');
  const userLocale = meta?.dataset.locale || 'en';
  const defaultLocale = meta?.dataset.defaultlocale || 'en';
  const instanceLocale = meta?.dataset.instancelocale || 'en';
Severity: Minor
Found in frontend/src/app/core/setup/init-locale.ts - About 1 hr to fix

    There are no issues that match your filters.

    Category
    Status