Some Thoughts On String Interpolation [l10n, restricting access, AA]

kdevel kdevel at vogtner.de
Fri Oct 27 12:48:07 UTC 2023


On Friday, 27 October 2023 at 11:20:04 UTC, Adam D Ruppe wrote:
> On Friday, 27 October 2023 at 11:03:55 UTC, kdevel wrote:
>> How is the translation workflow organized now? What is put in 
>> the po-Files?
>
> I literally have an example of this:
> https://github.com/adamdruppe/interpolation-examples/

Sorry for not having looked that up in the first place. 
`german.po` reads as follows:

```
msgid "You drink $1 cups a day and it gives you $2 IQ"
msgstr "Sie trinken $1 Tassen Kaffee am Tag. Dadurch erhöht sich 
Ihr IQ auf $2."
```

while the source code `04-internationalization.d` reads

```d
writeln(tr(i"You drink $coffees cups a day and it gives you 
$(coffees + iq) IQ"));
```

Does this allow the use of the `msgerge` program [1] for changes 
in the source code?

[1] 
https://www.gnu.org/software/gettext/manual/gettext.html#msgmerge-Invocation


More information about the Digitalmars-d mailing list