[Top][All Lists]

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

[bug #60027] Supporting template interpolation and tags in JavaScript

From: Philip Chimento
Subject: [bug #60027] Supporting template interpolation and tags in JavaScript
Date: Tue, 9 Feb 2021 13:14:15 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:83.0) Gecko/20100101 Firefox/83.0

Follow-up Comment #1, bug #60027 (project gettext):

I'd like to express my support for this — backtick strings with
interpolation have been around for long enough in JavaScript that there are
now plenty of JS programmers who have never experienced the language without
them, and so it's natural for them to want to use these strings with gettext.

I like this proposal because it neatly avoids the problems of code inside
backtick strings like `My number is ${Math.random()}`, which would just show
up as "My number is ${0}" in the messages file.

Many projects using GJS are written in mixed C and JavaScript so xgettext is
the natural (and possibly only) tool that will translate strings from a
codebase in both of these languages. In GJS we would be eager to implement
support for this proposed template tag, but there is no point for us to add it
unless xgettext will support it.


Reply to this item at:


  Message sent via Savannah

reply via email to

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