I18n #1138

Merged
yeet648 merged 7 commits from i18n into i18n 2019-08-12 02:25:02 +00:00
yeet648 commented 2019-08-11 18:03:22 +00:00 (Migrated from github.com)

Contribution to issue #1106 - Added i18n support to browser addon , resources, services pages , and related updates to en.yml.

btw - my first pull request!

Check List

Code Repository (if applicable): n/a

Contribution to issue #1106 - Added i18n support to browser addon , resources, services pages , and related updates to en.yml. btw - my first pull request! #### Check List <!-- Please add an x in each box below, like so: [x] --> - [ x] I have read and understand [CONTRIBUTING.md](https://github.com/privacytoolsIO/privacytools.io/blob/master/.github/CONTRIBUTING.md). - [ x] I have listed the source code for this project in [source_code.md](https://github.com/privacytoolsIO/privacytools.io/blob/master/source_code.md). - [ x] This project is [free/libre software](https://www.wikipedia.org/wiki/Free_software). - [ x] This project has an [associated discussion](https://github.com/privacytoolsIO/privacytools.io/issues). Code Repository (if applicable): n/a
jonah reviewed 2019-08-11 18:03:22 +00:00
yeet648 commented 2019-08-11 20:00:51 +00:00 (Migrated from github.com)

Is the automated build working in this branch? Just checking to see if I need to attend to the Travis CI failure that I'm seeing here.

Is the automated build working in this branch? Just checking to see if I need to attend to the Travis CI failure that I'm seeing here.
nitrohorse commented 2019-08-11 22:38:09 +00:00 (Migrated from github.com)

Is the automated build working in this branch? Just checking to see if I need to attend to the Travis CI failure that I'm seeing here.

Hey, thanks for the PR, @yeet648 🌟 Looking at the build log (click on "Details" next to "Travic CI - Pull Request)...

travis-err

There's apparently an error here:

Error:  (/home/travis/build/privacytoolsIO/privacytools.io/_i18n/en.yml): did not find expected key while parsing a block mapping at line 95 column 3
> Is the automated build working in this branch? Just checking to see if I need to attend to the Travis CI failure that I'm seeing here. Hey, thanks for the PR, @yeet648 :star2: Looking at [the build log](https://travis-ci.com/privacytoolsIO/privacytools.io/builds/122727740) (click on "Details" next to "Travic CI - Pull Request)... ![travis-err](https://user-images.githubusercontent.com/1514352/62840335-91d8f600-bc88-11e9-8dcc-80d64632760e.png) There's apparently an error here: ```yaml Error: (/home/travis/build/privacytoolsIO/privacytools.io/_i18n/en.yml): did not find expected key while parsing a block mapping at line 95 column 3 ```
nitrohorse (Migrated from github.com) reviewed 2019-08-11 22:38:39 +00:00
nitrohorse (Migrated from github.com) commented 2019-08-11 22:38:39 +00:00

Maybe the error is coming from this typo? Should be participate.

Maybe the error is coming from this typo? Should be `participate`.
nitrohorse (Migrated from github.com) reviewed 2019-08-11 22:39:52 +00:00
@ -70,9 +97,9 @@ opera=""
%}
nitrohorse (Migrated from github.com) commented 2019-08-11 22:39:51 +00:00

Hmm do we need more descriptive names for the cardv2 items rather than title#, name#, and descr#? I'm not sure this will be easy to maintain. What about browser-addon-card-title-2? @JonahAragon not sure if this matters or not.

Hmm do we need more descriptive names for the cardv2 items rather than `title#`, `name#`, and `descr#`? I'm not sure this will be easy to maintain. What about `browser-addon-card-title-2`? @JonahAragon not sure if this matters or not.
yeet648 (Migrated from github.com) reviewed 2019-08-11 22:58:16 +00:00
yeet648 (Migrated from github.com) commented 2019-08-11 22:58:16 +00:00

thanks for tip on build log. i will check that out myself next time. typo of "participate" was same in en.yml and footer.html so a mistake but I don't think cause of break. i fixed anyway.

thanks for tip on build log. i will check that out myself next time. typo of "participate" was same in en.yml and footer.html so a mistake but I don't think cause of break. i fixed anyway.

Thanks! I’ll take a look at this when I get home. If there’s some syntax issues I can fix those easily, no worries.

Thanks! I’ll take a look at this when I get home. If there’s some syntax issues I can fix those easily, no worries.
jonah reviewed 2019-08-11 23:00:52 +00:00
@ -70,9 +97,9 @@ opera=""
%}

Possibly. These particular variable names are per page, so you could determine “browser-addon” by looking at the file name alone.

Possibly. These particular variable names are per page, so you could determine “browser-addon” by looking at the file name alone.
yeet648 commented 2019-08-12 00:43:26 +00:00 (Migrated from github.com)

The build break is resolved. There were some extra double quotes in the en.yml that I had escape. The yaml parser is a liar liar since it reported the break in line 95 and the real issues were on 58 and 247.

Also, I have my local build all set up now so will make sure I'm good on my side before another PR.

The build break is resolved. There were some extra double quotes in the en.yml that I had escape. The yaml parser is a liar liar since it reported the break in line 95 and the real issues were on 58 and 247. Also, I have my local build all set up now so will make sure I'm good on my side before another PR.
nitrohorse commented 2019-08-12 00:53:54 +00:00 (Migrated from github.com)

Hmm I wonder where the Netlify preview deployment steps are? Looks like there's only the Pull Request step that ran which is weird...

Hmm I wonder where the Netlify preview deployment steps are? Looks like there's only the Pull Request step that ran which is weird...
nitrohorse (Migrated from github.com) reviewed 2019-08-12 00:54:29 +00:00
@ -36,0 +40,4 @@
privacy_badger_description: "is a browser add-on that stops advertisers and other third-party trackers from secretly tracking where you go and what pages you look at on the web. Privacy Badger learns about trackers as you browse."
ublock_origin: "uBlock Origin"
ublock_origin_title: "uBlock Origin: Block Ads and Trackers"
ublock_origin_description: "is an efficient <a href=https://github.com/gorhill/uBlock/wiki/Blocking-mode>wide-spectrum-blocker</a> that's easy on memory, and yet can load and enforce thousands more filters than other popular blockers out there. It has no monetization strategy and is completely open source."
nitrohorse (Migrated from github.com) commented 2019-08-12 00:54:29 +00:00

I'm wondering if the href needs escaped quotes here?

<a href=\"https://github.com/gorhill/uBlock/wiki/Blocking-mode\">wide-spectrum-blocker</a>
I'm wondering if the `href` needs escaped quotes here? ``` <a href=\"https://github.com/gorhill/uBlock/wiki/Blocking-mode\">wide-spectrum-blocker</a> ```
nitrohorse (Migrated from github.com) reviewed 2019-08-12 00:55:07 +00:00
@ -36,0 +40,4 @@
privacy_badger_description: "is a browser add-on that stops advertisers and other third-party trackers from secretly tracking where you go and what pages you look at on the web. Privacy Badger learns about trackers as you browse."
ublock_origin: "uBlock Origin"
ublock_origin_title: "uBlock Origin: Block Ads and Trackers"
ublock_origin_description: "is an efficient <a href=https://github.com/gorhill/uBlock/wiki/Blocking-mode>wide-spectrum-blocker</a> that's easy on memory, and yet can load and enforce thousands more filters than other popular blockers out there. It has no monetization strategy and is completely open source."
nitrohorse (Migrated from github.com) commented 2019-08-12 00:55:07 +00:00

Some goes for other hrefs in this file...

Some goes for other `href`s in this file...

This is exactly what I needed, thanks again 😄

Just for your own info, I did have to make one change: 3fc56dcc3f — the nameX variables actually weren't necessary and don't really work the way you expected them to in the cards. Instead of code like this:

{%- capture  name1 -%}{% t browser_addons.privacy_badger %}{%- endcapture -%}
{%- capture descr1 -%}{% t browser_addons.privacy_badger_description %}{%- endcapture -%}
. . .
description="<strong>name1</strong> descr1"

You can just do this (put both tags and the strong HTML in descrX itself:

{%- capture descr1 -%}<strong>{% t browser_addons.privacy_badger %}</strong> {% t browser_addons.privacy_badger_description %}{%- endcapture -%}
. . .
description=descr1
This is exactly what I needed, thanks again 😄 Just for your own info, I did have to make one change: https://github.com/privacytoolsIO/privacytools.io/commit/3fc56dcc3f06e81820ccc62cae762ab5d4831910 — the nameX variables actually weren't necessary and don't really work the way you expected them to in the cards. Instead of code like this: ``` {%- capture name1 -%}{% t browser_addons.privacy_badger %}{%- endcapture -%} {%- capture descr1 -%}{% t browser_addons.privacy_badger_description %}{%- endcapture -%} . . . description="<strong>name1</strong> descr1" ``` You can just do this (put both tags and the `strong` HTML in descrX itself: ``` {%- capture descr1 -%}<strong>{% t browser_addons.privacy_badger %}</strong> {% t browser_addons.privacy_badger_description %}{%- endcapture -%} . . . description=descr1
This repo is archived. You cannot comment on pull requests.
No reviewers
No Milestone
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: privacyguides/privacytools.io#1138
No description provided.