Localization- change all printed text #861
Labels
No labels
_CRITICAL_
API
app
backEnd
Blocked, waiting for further changes
bug
cleanup
close
design
duplicate
enhancement
feature request
frontEnd
help wanted
invalid
low priority
needs input
needs review
project documentation
question
research
reviewed
script
security
SQL
style
testing
topLevel
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Andras/BoundlessFlowCampus2K#861
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In the test #830 it worked so now we will introduce localization to all files/ all printed text

In the locales dictionary we have a json file for en & sv.
When creating keys make sure that the keys are descriptive and pressent in both the files.
en.json
sv.json
Right now we have one locales file as we dont have that much text to print but it can be a good idea to structure the files with comments to make it easier to break out if the need comes.
ex
The key is accessed with translate('key')
The documentation here is a little vague, so for future reference:
First, any and all pages that use the translate function, MUST have the following import declaration.
import { useLanguage } from '../features/useLanguage';And any function invoking translate MUST fetch the following constant.
const { translate } = useLanguage();Not doing this will generate an "undefined" error for translate, at build-time.
Additionally comments are NOT allowed inside JSON files, and will break them. Keys must also be separated by a comma ",".
I have completed localization work on the following pages.
These changes can be previewed in the corresponding branch #861, if anyone is curious, will be resuming work tomorrow.
#861-Localization-change-all-printed-textto #861-Localization-change-all-printed-text#861-Localization-change-all-printed-textto #861-localization-change-all-printed-text-Part-2Update:
At present, I "believe" i have now localized everything visible post-merge, with the exception of the cards themselves. There are currently a number of issues open on them, and I think it best that the people working on structuring and re-organizing them, should be the ones to localize them, in order to minimize conflicts.
If this seems agreeable, i will go ahead and make a pull-request for this last batch of changes, and consider my work on this issue completed.
It seems as a good approach, when your pr is approved and merged will i add to the review template to check localization where we will hopefully get the once left and future instances discovered.
@c24danli
Andras/BoundlessFlowCampus2K@50af70334bcan we close issue?we have new issues for the remaining translations so i will close this issue