Hello!

I am doing a proof of concept of using L20n.js to handle the translations for 
PyPI. I've generated a few questions from this that hopefully someone here can 
help answer!

1. How can I translate interface items that are not the main text of a html 
element? Thinks like placeholder attributes and such? The examples seem to only 
work with the main text.

2. Does L20n have any support for localizing numbers and dates? If not is there 
a particular tool that works well with L20n to do that?

3. The current version doesn't appear to support syntax like {{ varName.key }} 
or {{ varName['key'] }}, is there any other way of accessing a dictionary value 
that it does support?

4. Is there any way to have a "default" translation? It appears that L20n 
really wants you to just completely remove content from the HTML, but that 
breaks badly if the user doesn't have JS enabled. I can easily add the content 
into the template and have it keep working when JS is disabled... but then I 
have to maintain the "default" content twice, once in HTML and once in the L20n 
file. Alternatively is there a way to extract the content from a HTML file so I 
can just automate maintaining the default l20n language file?

5. How about translating strings that need to have HTML inside of them? 
Something like <p data-l10n-id="myid">You can click <a 
href="/foo/">here</a>.</p>. This appears to work if I just have <myid 
"Translated click <a>here</a>."> and it uses the source file's href and such. 
However that doesn't seem to work very well if there are two links and the 
translator needs to change the order of the links for some reason.
_______________________________________________
tools-l10n mailing list
[email protected]
https://lists.mozilla.org/listinfo/tools-l10n

Reply via email to