Generalize the report EN/עב language toggle and useReportLang hook
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Refactorización
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- react, typescript
- Área
- developer-experience, frontend
Línea de trabajo
The proposed files are packages/client/src/components/screens/reports/depreciation-report/report-lang-toggle.tsx and use-report-lang.ts; first read those changes in PR #5232 and the depreciation i18n.ts. Compare the landing page's landing-i18n.tsx and landing-nav.tsx to decide whether its localStorage-based language state should use the shared toggle. Migrate the depreciation report while preserving ?lang=he, replace navigation and coexistence with depreciationReportFilters, then run the existing tests from #5232.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Context
PR https://github.com/Urigo/accounter-fullstack/pull/5232 adds an EN | עב toggle to the depreciation report screen, plus a hook that keeps the language in the ?lang= URL param. Both are typed to the depreciation module and cannot be reused as they are. Other screens already have bilingual output, so the toggle and hook should be shared.
Files (as added by #5232):
packages/client/src/components/screens/reports/depreciation-report/report-lang-toggle.tsx:ReportLangToggle. The options are hard-coded toENandעב, and the type comes from the depreciationi18n.ts.packages/client/src/components/screens/reports/depreciation-report/use-report-lang.ts:useReportLang. It usesparseReportLangandREPORT_LANG_QUERY_PARAMfrom the depreciationi18n.ts.
Existing bilingual code to account for
- Landing page (
packages/client/src/components/landing/):LandingLangProviderinlanding-i18n.tsxkeeps the language in React context backed bylocalStorage(Hebrew default). Its toggle is inline inlanding-nav.tsx. This is a different mechanism from the URL-based hook. BilingualLabel(reports/securities-semi-annual-report/declaration-line.tsx): a label component with no state. It is not a toggle.- RTL wrappers (
dir="rtl"/lang="he") inshaam-6111-report/*,form-1214-report/declarations-editor.tsx,securities-semi-annual-report/*andbusiness/israeli-corporation-lookup.tsx: per-screen, with no shared switch.
Proposed work
- Move a generic toggle to a shared location (e.g.
components/uiorcomponents/common). Take the options and labels as props, and make the language type a generic parameter. - Parameterize the hook by query param name and default value, so each screen can keep its own param.
- Migrate the depreciation report to the shared pieces, with no change in behavior or tests.
- Evaluate the landing page's
LandingLangProvideras a second consumer. Its persistence (localStorage) differs from URL state, so decide whether to unify or keep both. - Adopt the shared toggle only on screens that have a language switch. The RTL-only screens do not need it.
Acceptance criteria
- The depreciation report's URL behavior is unchanged:
?lang=heworks, navigation usesreplace, and the hook coexists with thedepreciationReportFiltersparam. - Existing tests from #5232 still pass.
Notes
Depends on #5232 merging first, since the files it describes exist only on that PR's branch.
- Lenguaje dominante
- TypeScript
- Estrellas
- 30
- Forks
- 10
- Merge medio
- 2 d 12 h
- PR fusionados (30 d)
- 276
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Urigo/accounter-fullstack
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
Urigo/accounter-fullstack#5302 ·
Los mantenedores suelen responder en 2 días
-
1214 annual-audit-workflow
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Urigo/accounter-fullstack#5257 ·
Los mantenedores suelen responder en 2 días
-
1214 annual-audit-workflow
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
Urigo/accounter-fullstack#5256 ·
Los mantenedores suelen responder en 2 días
-
annual-audit-workflow
Dificultad 1/5 1-3 horas Aptitud para principiantes 87/100
Urigo/accounter-fullstack#5252 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
Urigo/accounter-fullstack#4919 ·
Los mantenedores suelen responder en 2 días
Todos los issues de Urigo/accounter-fullstack
Issues similares
-
area: integrations documentation priority: P2 size: XS
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
eddiejaoude/StackDash#798 ·
Los mantenedores suelen responder en 1 día
-
bot:ai-assisted component:midnight-js status:untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
midnightntwrk/midnight-js#1790 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
area:vscode bug has repro platform:macos platform:vscode regression
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
anthropics/claude-code#113502 ·
-
Add: Rajdhani TV HDAbiertocheck:passed streams:add
Dificultad 1/5 Menos de una hora Aptitud para principiantes 77/100
Los mantenedores suelen responder en 1 día