Please let me know if you can use them to provide a localized version of the webpage.
I have some process-related questions.
How do we know which language to use? In comment:2 you mentioned adding a menu to the page. I see such a menu at https://tb-manual.torproject.org/, defaulting(?) to English. Should we also look at the Accept-Language HTTP header (i.e., the user's in-browser configured language)? Do other Tor Project pages do that?
What is the process for handling revisions to the source text? Will the translation.git repository periodically get a revised index.html, then make changes in that repository? Then we import those changes back into snowflake.git? Is there some way to notify each group about when updates are ready from the other side?
Trac: Status: needs_review to needs_information Keywords: snowflake-webextension deleted, N/Aadded
Please let me know if you can use them to provide a localized version of the webpage.
I have some process-related questions.
How do we know which language to use? In comment:2 you mentioned adding a menu to the page. I see such a menu at https://tb-manual.torproject.org/, defaulting(?) to English. Should we also look at the Accept-Language HTTP header (i.e., the user's in-browser configured language)? Do other Tor Project pages do that?
How do we know which language to use? In comment:2 you mentioned adding a menu to the page. I see such a menu at https://tb-manual.torproject.org/, defaulting(?) to English. Should we also look at the Accept-Language HTTP header (i.e., the user's in-browser configured language)? Do other Tor Project pages do that?
The ideal will be to allow users to change it by hand, as our own browser allows to hide your language and many people browse the web in English because of fingerprinting, or sometimes are using public computers, etc, so it is unlikely that they will have the proper language configured.
What is the process for handling revisions to the source text? Will the translation.git repository periodically get a revised index.html, then make changes in that repository? Then we import those changes back into snowflake.git? Is there some way to notify each group about when updates are ready from the other side?
It would be great if somebody from the team can join transifex, as sometimes there are comments translators do on the source strings that would be nice if you review.
From inside of transifex you could see if the file is translated and reviewed, the comments, etc.
I can help you decide on the languages that are ready when you approach release.
We could also make a call for translations to speed up the process, currently many languages are translated but not reviewed.
Also, if you have friends that want to review a specific language before publishing, send them to me, as we need trusted reviewers for many languages.
I've started working on this, I think having full index.html files will be difficult to deal with and is different from how we are doing things the webextension and also different from how bridges.tp.o and gettor.tp.o work.
I've started expanding messages.json with the website text but if there's a better way to do this, let me know :)
Trac: Status: needs_information to assigned Owner: N/Ato cohosh
Okay I've been thinking more about how to structure this. https://snowflake.torproject.org is structured a bit differently from other anti-censorship tp.o sites and therefore does localization differently.
For example, bridgeDB and gettor both use python to render the site and python libraries for localization. The snowflake webextension uses messages.json for each string in the webextension.
Is this how we want to do this? I'm curious about how the rest of tp.o handles localization here. Also, it looks like the index.html file being used by transifex doesn't quite match the index.html file in proxy/static/.
Does it make incremental changes to index.html harder to update?
Is this how we want to do this? I'm curious about how the rest of tp.o handles localization here. Also, it looks like the index.html file being used by transifex doesn't quite match the index.html file in proxy/static/.
That's partly my fault, because I did some HTML and CSS refactoring changes not knowing that the translation repository existed.
I can see how merging changes like that will be annoying to translators. But if we don't anticipate index.html being changed that often, I'm fine with translating the whole file as a "worse-is-better" approach.
Is this how we want to do this? I'm curious about how the rest of tp.o handles localization here.
Some applications handle it with po4a and provide me of a .pot file and i give them the different language .po files
the resources used by TBB are mozilla localization dtd and properties files
the index file i added directly using the transifex framework because it was an easy html file... maybe that is not the case anymore?
some markdown files are translated directly
Also, it looks like the index.html file being used by transifex doesn't quite match the index.html file in proxy/static/.
This was because i didnt have it configured to pull daily from it. This is fixed now, and the file has been refreshed. Transifex will look it up twice a day and update it automatically.
I've started working on this, I think having full index.html files will be difficult to deal with and is different from how we are doing things the webextension and also different from how bridges.tp.o and gettor.tp.o work.
I've started expanding messages.json with the website text but if there's a better way to do this, let me know :)
Oh yes, json files are also a good match and they are better than the html straight.
Sorry I just read this comment now, but yeah that would be much better
If you want to do it this way, I would suggest not doing
<h2>__MSG_browser__</h2>
but instead something like
<h2 data-msgid="__MSG_browser__">Browser</h2>
That way, a failure of the fill function, or a missing translation, will at least show English text rather than a raw message identifier. The data- attribute prefix can be used to attach arbitrary information to HTML elements.
I'm guessing that this kind of structure will be difficult to translate because the translator cannot change the order of the <a></a> and <b></b> fragments. It may be better to allow HTML in the replacement strings.
Note that because we're using the same messages.json file as the webextension for the translations, we won't need two different translation repositories.