Archived
[WIP] Add Weblate Support, Move Strings to YAML Files #1105
Labels
Clear labels
:mag:🤖 Search Engines
approved
dependencies
duplicate
feedback wanted
high priority
I2P
iOS
low priority
OS
Self-contained networks
Social media
stale
streaming
todo
Tor
WIP
wontfix
XMPP
[m]
₿ cryptocurrency
ℹ️ help wanted
↔️ file sharing
⚙️ web extensions
✨ enhancement
❌ software removal
💬 discussion
🤖 Android
🐛 bug
💢 conflicting
📝 correction
🆘 critical
📧 email
🔒 file encryption
📁 file storage
🦊 Firefox
💻 hardware
🌐 hosting
🏠 housekeeping
🔐 password managers
🧰 productivity tools
🔎 research required
🌐 Social News Aggregators
🆕 software suggestion
👥 team chat
🔒 VPN
🌐 website issue
🚫 Windows
👁️ browsers
🖊️ digital notebooks
🗄️ DNS
🗨️ instant messaging (im)
🇦🇶 translations
approved, waiting for a PR
Pull requests that update a dependency file
The Invisible Internet Project (I2P)
Operating Systems
A label for stalebot if it gets added
Anything related to media streaming.
Anything covering the Tor network
active work in progress, do not merge or PR (yet)!
Issues or bugs that will not be fixed and/or do not have significant impact on the project.
Extensible Messaging and Presence Protocol
Matrix protocol
Browser Extension related issues
Correction of content on the website
Firefox & forks, about:config etc.
Anything primarily related to site cleanup.
Virtual Private Network
*Technical* issues with the website.
Domain Name System
Anything covering a translated version of the site
No due date set.
Dependencies
No dependencies set.
Reference: privacyguides/privacytools.io#1105
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
➡️ Info and checklist to-do @ #1106 ⬅️
Alright. So it turns out if we use jekyll-multiple-languages-plugin and throw every single string on the site into
/_i18n/en.ymlwe can then use our Weblate install to translate the site much easier.The problem of course, is moving all the strings manually 😅
So that's going to be my project for now. As of
df38bc4I have successfully moved... the index page toen.yml, which took about an hour 🙄If anyone wants to help me out with this (which I would greatly appreciate), I'm doing this work in the
i18nbranch of this repo. If you aren't an org member you can create Pull Requests to that branch (as opposed to master), by selecting i18n instead as the base branch in your pull request:What needs to be done
Every English text string in every (HTML and Markdown) file needs to be moved to a key in
en.yml. For example, lets look this line in_includes/sections/privacy-resources.html:That is of course the More Privacy Resources header on the homepage. What I've done is taken the English text out of that line, and placed it
en.yml, like so:Then, back in the HTML file, I replaced the English text with
{% t privacy_resources.header %}(which is a Jekyll tag saying totranslate the stringprivacy_resources.header(from the lines above). Like so:Which really isn't that hard! It's simply time consuming to copy/paste everything into this file.
en.ymlYou can see how I've formatted this file already, but basically it should be like:
Where "Page" is the section being translated, Key is a brief description, and "String" is the English text. At the top there is also a "Global" section, for strings that are reused a bunch on different pages:
Pretty much everything needs to go into this file, and then this file will automatically be used as the base in Weblate upon which all translations will be based on (which will be far easier).
Closes #1106
Deploy preview for privacytools-io ready!
Built with commit
d05de7f238https://deploy-preview-1105--privacytools-io.netlify.com
@@ -0,0 +256,4 @@more: "More Cryptocurrencies"the: "The"team: "privacytools.io team"endorse: "does not necessarily endorse all of the cryptocurrencies listed on this page. Please conduct your own research before purchasing any cryptocurrencies."This is really bad idea. If someone will try to translate it, result will make zero sense.
We can't just seperate parts of one sentance.
Also, that "The" is impossible to translate in some languages, pretty much.
@@ -0,0 +256,4 @@more: "More Cryptocurrencies"the: "The"team: "privacytools.io team"endorse: "does not necessarily endorse all of the cryptocurrencies listed on this page. Please conduct your own research before purchasing any cryptocurrencies."Why? A translator will have to look for a context anyway and on weblate you can even add the context direcly on the page of the string (as picture or text).
Translators don't translate a sentence literally, they adapt it to their language. So i don't see any problem with this.
@@ -0,0 +256,4 @@more: "More Cryptocurrencies"the: "The"team: "privacytools.io team"endorse: "does not necessarily endorse all of the cryptocurrencies listed on this page. Please conduct your own research before purchasing any cryptocurrencies."How you want to put in translation empty string?
@@ -0,0 +256,4 @@more: "More Cryptocurrencies"the: "The"team: "privacytools.io team"endorse: "does not necessarily endorse all of the cryptocurrencies listed on this page. Please conduct your own research before purchasing any cryptocurrencies."Why empty string?
Translators can find the context looking at the source string, which they should do anyway if they want their translation to be as accurate as possible and as i said, context can be added on Weblate (they have a native feature) directly when visualizing the string.
@@ -0,0 +256,4 @@more: "More Cryptocurrencies"the: "The"team: "privacytools.io team"endorse: "does not necessarily endorse all of the cryptocurrencies listed on this page. Please conduct your own research before purchasing any cryptocurrencies."Because "The privacytools.io team" would be translated to "Zespół privacytools.io" in Polish, there is no "The". So it has to be empty.
@@ -0,0 +256,4 @@more: "More Cryptocurrencies"the: "The"team: "privacytools.io team"endorse: "does not necessarily endorse all of the cryptocurrencies listed on this page. Please conduct your own research before purchasing any cryptocurrencies."Ok, i guess you are referring to the
Thetwo strings above. In that case i agree, only one variable should be used:team: "The privacytools.io team".@@ -0,0 +256,4 @@more: "More Cryptocurrencies"the: "The"team: "privacytools.io team"endorse: "does not necessarily endorse all of the cryptocurrencies listed on this page. Please conduct your own research before purchasing any cryptocurrencies."This may not be helpful this late, but Finnish and Czech don't have "the" either, in Swedish it would be a part of the word (vatten = the water IIRC) and some languages like Spanish have two different word for it, masculine and feminine, I am not sure if there is also neutral.
I'm sorry, @JonahAragon but it looks like my merging of master into i18n closed this PR and its associated issue, https://github.com/privacytoolsIO/privacytools.io/issues/1106. Could you see if you can reopen the PR and the issue?
@djoate oh. No, that was my mistake. Earlier I merged your PR into the master branch of the actual repository 😳 — I undid that little mistake but didn't realize that it had closed this PR too. I don't think I can reopen this so I'll make another PR.