Conversation
Contributor
oitel
commented
Mar 26, 2026
- Add Locale::Domain struct to avoid ambiguous overloads
- Accept std::string_view to simplify passing std::strings
- Add Locale::translateAll functions for translating string vectors
- Add s_tr macro to return std::string directly
- Translate tab names from .ui.json files
- Allow to store .pot and .po files in separate locations
- Fix typo in compile_translations.py
8c4073b to
c4df5e5
Compare
Grantim
approved these changes
Mar 26, 2026
cmake/Modules/I18nHelpers.cmake
Outdated
Comment on lines
+52
to
+55
| if(${FOUND_LOCALES_COUNT} EQUAL 1) | ||
| message(STATUS "Found ${FOUND_LOCALES_COUNT} translation for ${DOMAIN_NAME}.") | ||
| else() | ||
| message(STATUS "Found ${FOUND_LOCALES_COUNT} translations for ${DOMAIN_NAME}.") |
Contributor
There was a problem hiding this comment.
Suggested change
| if(${FOUND_LOCALES_COUNT} EQUAL 1) | |
| message(STATUS "Found ${FOUND_LOCALES_COUNT} translation for ${DOMAIN_NAME}.") | |
| else() | |
| message(STATUS "Found ${FOUND_LOCALES_COUNT} translations for ${DOMAIN_NAME}.") | |
| message(STATUS "Found ${FOUND_LOCALES_COUNT} translation(s) for ${DOMAIN_NAME}.") |
| } | ||
| readUIJson_( *itemsStructRes ); | ||
| const auto filename = utf8string( path.filename() ); | ||
| const auto stem = filename.substr( 0, filename.find( '.' ) ); |
Contributor
There was a problem hiding this comment.
please add comment about .ext.ext situation (to explain why we don't use std stem)
Contributor
There was a problem hiding this comment.
Suggested change
| const auto stem = filename.substr( 0, filename.find( '.' ) ); | |
| const auto stem = filename.substr( 0, filename.find( '.' ) ); // cannot use `path.stem()` because of two segment extensions (.ui.json, .items.json) |
c4df5e5 to
053dba4
Compare
- Add Locale::Domain struct to avoid ambiguous overloads - Accept std::string_view to simplify passing std::strings - Add Locale::translateAll functions for translating string vectors - Add s_tr macro to return std::string directly - Translate tab names from .ui.json files - Allow to store .pot and .po files in separate locations - Fix typo in compile_translations.py
053dba4 to
cfd316b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.