[Top][All Lists]

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

[bug-gettext] [bug #50920] support Javascript template strings in xgette

From: Bruno Haible
Subject: [bug-gettext] [bug #50920] support Javascript template strings in xgettext
Date: Sun, 7 Apr 2019 20:11:53 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0

Update of bug #50920 (project gettext):

                  Status:                    None => Fixed                  
             Assigned to:                    None => haible                 
             Open/Closed:                    Open => Closed                 


Follow-up Comment #12:

Proper parsing of the template literals is implemented through

Note: This is just the parsing. If someone makes use of tagged template
literals for internationalization, by defining a tag function that
1. converts the given string arguments to a single string with placeholders,
2. looks up the translation of that string from a message catalog,
3. inserts the provided values in place of the placeholders,
such as in
   tag `OK to overwrite file ${source} with ${target}?`
-> "OK to overwrite file {0} with {1}?"
or "OK to overwrite file %s with %s?"
this will require extra support in xgettext. xgettext does not "see" the
definition of the tag function, nor can it execute JavaScript.


Reply to this item at:


  Message sent via Savannah

reply via email to

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