rokucommunity / rokucommunity/brighterscript
Provide compile checking for translations
@chrisdp is already working on this.
Since May 1, 2020.
- Dominant language
- TypeScript
- Stars
- 208
- Forks
- 68
- Avg merge
- 8h 39m
- Merged PRs (30d)
- 39
Description
This is a bit of a brain dump. I might tidy it up later.
The tr() function from Roku provides i18n functionality.
We should do the following:
- add auto-completes for available strings in the translation files whenever you type
tr() - parse all of the translation files
- add a warning for any
tr()call referencing asourcethat is not available in at least 1 localization file - add a warning for any
<Label text="" />tag that references asource - add a compiler option
strictLocalizationwhich does the stuff above.
We should be able to look it up in the file.
There are two ways this is handled
In the xml:
<Label id=“myLabel” text=“hello world” />
Roku will automatically replace "hello world" with the localized value IF there is a
Provide autocomplete for them.
Related information:
https://developer.roku.com/docs/developer-program/core-concepts/localization.md
https://developer.roku.com/docs/references/brightscript/language/global-utility-functions.md#trsource-as-string-as-string
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.