This repository has been archived by the owner on Feb 9, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Setup Internationalization #26
base: main
Are you sure you want to change the base?
Setup Internationalization #26
Changes from 2 commits
a154c3a
98af20b
3890f38
b21c989
eb038ae
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I seems like this file could quite fast get messy if we don’t have some structure.
@TouHouNo or @prinshamlet do you have any good advice or experience on this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably good to have some convention in the names for the structure that includes "module names", like using "intro_page__text_name" 🤔
@rh-concordium might also have some insight on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I would suggest grouping related texts keys according to functionality using dot notation. E.g., "onboarding.intro_text", "onboarding.terms_and_conditions", etc. Then you could use additional additional dots if you want to further subgroup your functionality/texts.
I wouldn't use dots for general terms like "Ok", "Continue", etc, though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the dot notation, but it seems impossible with the current setup.
We can do camelCase with underscore as the separator:
onboarding_termsAndConditions
? 🤔There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we use more descriptive names instead of _0 and _1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I'm not sure there are more descriptive names, it's just one text split into two paragraphs.
I think the right thing is merging them? 🤔
(I've tried doing that)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpicking: Is "cont" a common abreviation for "Continue" at concordium? Otherwise, I would just use the full name as the key for readability
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not a common abbreviation.
I did it because both
Continue
andcontinue
are "bad" keys.Continue
is rejected by the generator andcontinue
causes compile issues because it is a keyword.Maybe there is a better solution though? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PS: In my old job we were using string xml files, which is why we could get away with dots and we could use whatever keys we liked (and the reason we were using string xml files was that we had a huge language file already 5000+ words that was shared with other native apps)