bug-gettext
[Top][All Lists]
Advanced

[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
https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=db8e4b76206ec179112b8171b92270e025c62a20

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:

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

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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