[WIP] Add Weblate Support, Move Strings to YAML Files #1458
Closed
jonah
wants to merge 47 commits from
i18n
into master
pull from: i18n
merge into: privacyguides:master
privacyguides:master
privacyguides:dependabot/bundler/nokogiri-1.13.6
privacyguides:dependabot/bundler/addressable-2.8.0
privacyguides:freddy-m-patch-3
privacyguides:pr-add_RemoveMyPhone_sponsor
privacyguides:pr-browser_cleanup_1257_1328_1430
privacyguides:freddy-m-patch-2
privacyguides:freddy-m-patch-1
privacyguides:pr-vpn_hated_one_video
privacyguides:cdn
privacyguides:update-nitrohorse-image
privacyguides:promote-metager-to-card
privacyguides:hardware
privacyguides:pr-add_azirevpn
privacyguides:pr-add_mailfence
privacyguides:shop
privacyguides:1673
privacyguides:pr/1658
privacyguides:i18n-simple
privacyguides:sponsorship-edits-nov2019
privacyguides:ipfs
privacyguides:blacklight447-ptio-patch-3
privacyguides:blog
privacyguides:remove-windows-icons
privacyguides:pr/1147
privacyguides:i18n-testing
privacyguides:add-beautify
No Reviewers
Labels
Clear labels
🔍🤖 Search Engines
approved
approved, waiting for a PR
dependencies
Pull requests that update a dependency file
duplicate
feedback wanted
high priority
I2P
The Invisible Internet Project (I2P)
iOS
low priority
OS
Operating Systems
Self-contained networks
Social media
stale
A label for stalebot if it gets added
streaming
Anything related to media streaming.
todo
Tor
Anything covering the Tor network
WIP
active work in progress, do not merge or PR (yet)!
wontfix
Issues or bugs that will not be fixed and/or do not have significant impact on the project.
XMPP
Extensible Messaging and Presence Protocol
[m]
Matrix protocol
₿ cryptocurrency
ℹ️ help wanted
↔️ file sharing
⚙️ web extensions
Browser Extension related issues
✨ enhancement
❌ software removal
💬 discussion
🤖 Android
🐛 bug
💢 conflicting
📝 correction
Correction of content on the website
🆘 critical
📧 email
🔒 file encryption
📁 file storage
🦊 Firefox
Firefox & forks, about:config etc.
💻 hardware
🌐 hosting
🏠 housekeeping
Anything primarily related to site cleanup.
🔐 password managers
🧰 productivity tools
🔎 research required
🌐 Social News Aggregators
🆕 software suggestion
👥 team chat
🔒 VPN
Virtual Private Network
🌐 website issue
*Technical* issues with the website.
🚫 Windows
👁️ browsers
🖊️ digital notebooks
🗄️ DNS
Domain Name System
🗨️ instant messaging (im)
🇦🇶 translations
Anything covering a translated version of the site
No due date set.
Dependencies
No dependencies set.
Reference: privacyguides/privacytools.io#1458
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.
No description provided.
Delete Branch "i18n"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
➡️ Info and checklist to-do @ #1106 ⬅️
11/02: Oops, I accidentally closed #1105. Continuing this discussion here!
Alright. So it turns out if we use jekyll-multiple-languages-plugin and throw every single string on the site into
/_i18n/en.yml
we 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
df38bc4
I 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
i18n
branch 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 tot
ranslate 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.yml
You 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
86eb0a8f50
https://deploy-preview-1458--privacytools-io.netlify.com