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.
pub fn compile_i18n
ingettext_utils
The way this works now is:
compile_i18n
is called frombuild.rs
. Itpo/{domain}
and the `.po insidetarget/translations/.domains/{domain}
(previouslytarget/debug/gettext_macros/{domain}
)It doesn't contain the domain on the first line anymore.
GETTEXT_MACROS_DOMAIN
to {domain}, it's then used byi18n!
andinclude_i18n!
i18n!
now.pot
file ifGETTEXT_POT_INIT
is not set, then setGETTEXT_POT_INIT
.pot
like beforeinclude_i18n!
now.pot
with each.po
file for the domain (it fetches the list of locales fromtarget/translations/.domains/{domain}
.po
file and put the output into the tokenstream directly (without writing to a.mo
file, see note)Removed feature
uniform_paths
(since it's in stable now),and added(don't need it anymore since a secondproc_macro_diagnostic
to allowi18n!
to print warnings when new strings are addedcargo build
is not needed).About the include_i18n not writing to a mo file, this is because otherwise
include_bytes!
would add an implicitcargo:rerun-if-changed=file.mo
, andcargo build
would rebuild the whole project every time even if nothing changed.