Archived
i18n: Keying the site (1/5) - Card/cardv2, misc, navbar, and providers #1510
Merged
djoate
merged 32 commits from 2019-11-25 19:53:36 +00:00
i18n-simple into i18n-simple
Dismiss Review
Are you sure you want to dismiss this review?
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 labels
🇦🇶 translations
Milestone
No items
No Milestone
No due date set.
Dependencies
No dependencies set.
Reference: privacyguides/privacytools.io#1510
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.
Keying the site, part 1 - Card/cardv2, misc, navbar, Providers
Related to PR https://github.com/privacytoolsIO/privacytools.io/pull/1509
Card/cardv2 content, navbar text, misc, and everything under Providers in the navbar.
Everything under Browsers in the navbar
Everything under Software in the navbar
Everything under OS in the navbar
Merging
masterintoi18n-simpleto fix conflicts, and fixing loose endsTo prevent myself from constantly merging due to changes on
master, Part 5 to clean up loose ends and mergingmasterintoi18n-simplewill not be opened until all of the other parts have been reviewed and merged.Since there are going to be changes to every string on the site, I'm splitting the keying process in multiple PRs. This PR aims to key
The migration to jekyll-simple-i18n makes keying of some pages trivial with regexp replacements.
This PR also adds in two new filters to aid the keying process.
translate_textadds strings to the source file in the same manner as the tag. This lets us key contents of card and cardv2, which is as simple as just using{{ include.title | translate_text}}in card.html/cardv2.html. This allows us to not use capture tags for every single card. This also lets us key external links.translate_pageensures proper redirection to the appropriate local page. For example, on the original site, a link going to/providers/is just/providers/, but the same link in theesversion would be changed to/es/providers.Some comments:
Known issues
Capture tags
I've opted to still use capture tags for the extra buttons inside of
_includes/sections/participate.htmlas I thought that it would be better not to include entire buttons in the source file (e.g.,'<a class="btn btn-warning mb-1" href="https://github.com/privacytoolsIO/privacytools.io/graphs/contributors">Contributor List</a>)New lines in strings
Refrain from putting newlines in strings, otherwise the plugin will think it's a new key. The
descriptionstring in_includes/section/browser-recommendation.htmlwas automatically keyed as
The plugin thinks "recommendations:" is another key. The fix is to remove the newline in the original string.
This string in
email-alternativescaused an error in the build process (there's a line break between "trustless," and "meaning"):I've had to fix these two issues for it to key properly.
Found some other strings that are giving compile errors
I've built this locally and there doesn't seem to be any problems with using href inside of the source file. The source strings may look messy with all of the
<aandhref, but at least it lets us specify language-specific sites for any links we include in our descriptions.Not sure if the same should be done all links though. For example, we could also key the links that these buttons point to:
This would let translators specify links to specific locales. For instance, Firefox offers multiple translations (https://www.mozilla.org/en-US/firefox/windows/, https://www.mozilla.org/es-MX/firefox/windows/, https://www.mozilla.org/it/firefox/windows/, etc.)
EDIT: This is now done in https://github.com/privacytoolsIO/privacytools.io/pull/1510/commits/3629ad6509afe4441082e35dbabb3548f50ed066
The 404 page is defined in Nginx on the server-side. Even if we had language-specific files, I’m not sure how the server would determine whether or not to use them. That’s not a super big priority to me.
This PR is now done and awaiting review.
Just to recall, this PR aims to key
I have not the touched breadcrumbs and the 404 page in this PR
Just added support for using the right HTML page language and hreflang tags. For example, the "Spanish" version of cloud providers has this in the source:
Though maybe we should also key those keywords and description
@JonahAragon After this part gets merged, see if you can get this some of this stuff working with Weblate