mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-19 06:31:13 -03:00
This new wrapper type can be constructed via macros which invoke the `gettext_extract` proc macro to extract the string literals for PO file generation. The type checking enabled by this wrapper should prevent trying to obtain translations for a string for which none exist. Because some strings (e.g. for completions) are not defined in Rust, but rather in fish scripts, the `LocalizableString` type can also be constructed from non-literals, in which case no extraction happens. In such cases, it is the programmer's responsibility to only construct the type for strings which are available for localization. This approach is a replacement for the `cargo-expand`-based extraction. When building with the `FISH_GETTEXT_EXTRACTION_FILE` environment variable set, the `gettext_extract` proc macro will write the messages marked for extraction to a file in the directory specified by the variable. Updates to the po files: - This is the result of running the `update_translations.fish` script using the new proc_macro extraction. It finds additional messages compared to the `cargo-expand` based approach. - Messages IDs corresponding to paths are removed. The do not have localizations in any language and localizing paths would not make sense. I have not investigated how they made it into the po files in the first place. - Some messages are reordered due to `msguniq` sorting differing from `sort`. Remove docs about installing `cargo-expand` These are no longer needed due to the switch to our extraction macro.