bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #56774] support Rust programming language


From: Kévin
Subject: [bug #56774] support Rust programming language
Date: Wed, 29 Dec 2021 05:45:20 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0

Follow-up Comment #2, bug #56774 (project gettext):

For reference, the gettext-rs <https://crates.io/crates/gettext-rs> crate
allows us to use _xgettext_ to translate strings.

If we only use functions, POT generation works well with Rust, detecting it
like the C language. We can apply Rust string formatting at runtime by
creating other functions around _gettext-rs_, and use the _keyword_ option to
make _xgettext_ detect those new functions.

However we lose compile-time string formatting validation. To solve that, we
need to use _macros_ whose name always ends with a _!_, which makes them
incompatible with the _keyword_ option.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?56774>

_______________________________________________
  Message posté via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]