Open lache-melvin opened 1 week ago
TODO: Check with report JSON form translations to make sure we're not doubling up on any work etc
Always serve custom.json along with common.json (would be empty object by default)
to clarify: custom.json
would be empty by default, right? The proximity made me think the brackets relate to common.json
Alternatively - the server combines custom.json
and common.json
and serves up a single file.
This would be easier to code for on the front end as no change would be required. If we have two files then we need to either combine the json files (during the i18n initialisation? ) or modify the useTranslation
hook to always use the custom
namespace while using common
as the default or ..?
Do we need to support custom translations for multiple languages?
that would be more comprehensive as a solution, so I'd prefer to support that. In practice though - countries have only used a single language and would therefore only require a single language in the custom namespace. So we're adding complexity which would be unused.
modify the
useTranslation
hook to always use thecustom
namespace while usingcommon
as the default
Yeah that was the thinking... just seeing as the useTranslation
hook already has the "merging" functionality baked in, why not make the most of it! Not sure if that's a little safer too, keeping common.json
separate so we know the fallbacks are definitely available?
Though yes, combining on the server is also a nice solution, and could be shared by both frontend and backend (for reports) π
Is your feature request related to a problem? Please describe π
A way for users to configure custom translations on the OMS central server.
The user should be able to:
Describe the solution you'd like π
custom.json
along withcommon.json
(would be empty object by default)custom.json
namespace overridescustom.json
objectid
,language
,data
QUESTIONS:
Describe alternatives you've considered π
{{ count }}
Additional context π
Moneyworks Jobcode π§°