-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add French translation #213
Conversation
I corrected the logic of liquid flag for the outdated translation alert tool and removed the 'version' variable from the front matter of the download files in order to in agreement with #206
@huey735 the French translation looks good. But I can't merge this PR for the issue noted below. The outdated translations alert tool still doesn't seem right to me. In my testing, it appears on any non-English page no matter what. If I understand your intentions correctly, what you probably want instead are flags for each language (implemented as page variables) that can be toggled every time an update is made to the corresponding English page. Then the outdated-translation text would show on every non-English page until it's updated with the translation, and the flag variable can then be turned off again. If you want, I can implement this for you. FYI in the future, it might be best to make separate PRs for separate objectives so at least the good commits can be merged. |
@m52go it looks like this right now
My idea is to add or remove "page.lang == langcode" depending on what is what's not up to date. Maybe there's a better way to do it. I'm still learning Github. I thought that in order to do two concurrent but separate PRs I needed to work on two different branches but that doesn't seem like the case. I guess I need to work on different forks. I'll improve next time. |
Ah, I see now. Generally it's bad practice to edit code to achieve that kind of functionality. Rather, it's better to structure the code so that changes can be made in the front end (in this case, through Liquid page variables). Another benefit of this approach: by using page variables, you could mark specific pages as outdated. Otherwise, marking a language as outdated makes it outdated through the whole site, even if it's just one page that needs updates.
No worries. You can make as many branches as you want :) |
So, concretely, I would do something like this. Make an Then make the condition look like this:
Then whenever an update is made to an English page, all the non-English pages should have their |
Yeah but this 'addfrench' branch of mine also inherited the commits of the 'updatetranslation' branch from #204. I need to figure out how to keep them separate. |
Oh I see. You could |
On @m52go's advice I changed the construction of the outdated translation alert tool to be spefic to the page instead of the language. I added a "outdated" variable to the front matter of the relevant translated pages. They'll have the values 'true' or 'false' according to the state.
Updated. |
_includes/main_nav_tr.html
Outdated
@@ -4,11 +4,11 @@ | |||
<a class="navbar-brand" href="{{ site.url }}/{{ page.lang }}/"><img src="{{ site.url }}/images/bisq-logo.svg" height="30"/></a> | |||
|
|||
<!-- Outdated translation tag--> | |||
{% if page.lang == page.lang == "de" or page.lang="es" or "pt-PT" or page.lang == "zh-CN" %} | |||
{% if page.lang == "de" or page.lang= "es" or "pt-PT" or page.lang == "zh-CN" %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you test this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should have been updated with the latest commit as it's different now.
https://github.com/huey735/bisq-website/blob/addfrench/_includes/main_nav_tr.html
@huey735 looks like some pages don't have the variable? For example pt-pt/index and pt-pt/vision? I didn't check thoroughly, but those stood out. There may be others. If it isn't too much work, could you make the variable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wiz _includes/main_nav_tr.html has been properly updated. For some reason it didn't show in the previous commit.
_includes/main_nav_tr.html
Outdated
<a class="navbar-brand" href="{{ site.url }}/{{ page.lang }}/"><img src="{{ site.url }}/images/bisq-logo.svg" height="30"/></a> | ||
|
||
<!-- Outdated translation alert tool tag--> | ||
{% if page.outdated %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wiz did have a point though...you should really test. This variable also needs to be updated...would be an easy catch with a simple test, as it wouldn't work as intended.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry guys. I'll get to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you deploy this to a netlify instance so we can see a preview? |
_data/strings_en.yml
Outdated
@@ -303,26 +303,26 @@ stats: | |||
pBSQDistribution: Mainnet BSQ distribution is slated for April 2019. | |||
pTotalTrades: > | |||
<p class='stat-label'>Total Trades</p> | |||
<p class='stat-figure'>32,318</p> | |||
<p class='stat-figure'>34,535</p> | |||
<p class='stat-note'>Through June 2019</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
July
<p class='stat-note'>Through June 2019</p> | |
<p class='stat-note'>Through July 2019</p> |
@wiz I'm afraid I don't know how to do that. |
@@ -4,6 +4,7 @@ title: Vision ‹ Bisq - The decentralized Bitcoin exchange | |||
ref: vision | |||
lang: pt-PT | |||
language: Português (PT) | |||
outdated_translation: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is true...intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I have purposefully not changed them yet as I want it to through Transifex and I wanted to text the alert tool.
@huey735 no worries buddy but IMO this PR needs to be rejected - if you want to make a PR to "add french translations" then it should only contain that and not add unrelated new functionality. it kinda looks like you just commited your work tree with random other things in it, which is fine when you do that on your local tree, but you need to separate features when submitting PRs for merging so that we can cleanly review them one at a time. |
Yeah I think wiz is right here. https://github.com/bisq-network/bisq/blob/master/CONTRIBUTING.md#contributor-workflow Note this part: "Pull requests should be focused on a single change." Typically I tend to be more lax with this on the website repo since it's not the end of the world if there's a mistake (e.g., unlike the software where money can be lost, etc) but this PR is an example of why it's not ideal to bunch up different changes in the same pull request for reviewers. @huey735 please make separate pull requests for the French translation, translation flag, etc. |
Building on top of #204