Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move all hardcoded user displayable strings into a locale header file #176

Closed
davetcc opened this issue Jan 6, 2023 · 1 comment
Closed
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@davetcc
Copy link
Collaborator

davetcc commented Jan 6, 2023

Going forward, no user-displayable text will be hard coded into a CPP file. Instead, each textual item will be broken out as a constant EG TXT_DIALOG_OK_TEXT, and the text behind the definition will be found in each of the locale header files.

There will be a header file language_select.h that will use the following priority logic to determine what to include

If header project_locale.h exists then that will be used first with absolute priority.
If TC_LOCALE_YourLanguage is not set, the English language header is included.
Otherwise, it will go through the remaining languages, again English is the default.

@davetcc davetcc added the enhancement New feature or request label Jan 6, 2023
@davetcc davetcc added this to the 3.1.0 milestone Jan 6, 2023
@davetcc davetcc self-assigned this Jan 6, 2023
davetcc added a commit that referenced this issue Jan 7, 2023
@davetcc
Copy link
Collaborator Author

davetcc commented Jan 7, 2023

I've tested with no locale (English) and French, works in both cases. This does not solve the problem of multi-language menu items, but it does put the base in place that will allow this in the future. We ask that anyone who can creates PRs with additional locale files for other languages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant