Skip to content
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

Translate website to Portuguese #190

Merged
merged 7 commits into from
Jul 17, 2019
Merged

Translate website to Portuguese #190

merged 7 commits into from
Jul 17, 2019

Conversation

huey735
Copy link
Contributor

@huey735 huey735 commented Jun 21, 2019

Create duplicates of:
/_data/
dao_content.yml
main_nav.yml
/_includes/
footer.html
homepage_content.html
main_nav.html
os_selector_options.html
Add the "_tr" suffix to signal that they're the translated versions and adapt the files inside /_includes/ to link the translated pages and strings.

Add pt_PT.yml inside /_data/ with the translated strings from .html files.

Change functions in /_layouts/default.html to accommodate for new languages.
Add "ref", "lang" and "language" variables to the web pages to be translated and copy them into a folder named after the respective language's code (the same specified in "lang") :
/community.md
/dao.html
/downloads.html
/faq.html
/index.md
/markets.html
/stats.html
/vision.md

Copy also /images/DAO and re-render the images with the translated strings.

@m52go
Copy link
Contributor

m52go commented Jun 30, 2019

Hi @huey735, sorry for the delay...I've been traveling and I'm on holiday this upcoming week. I've cloned your repository and will check it out as I can.

For now, two small things:

  1. could we change the pt_PT directory to just pt? I think it would help URLs would look cleaner.
  2. do we want to keep URLs in English? I thought we discussed that on the last translator call, but I can't remember.

@huey735
Copy link
Contributor Author

huey735 commented Jun 30, 2019

  1. I used this standard for localization as we have Portuguese from Portugal(pt_PT) and Portuguese from Brazil (pt_BR). What standard do you suggest we use?
  2. We agreed to translate them. But "downloads" and "index" should be exceptions due to how their linked.

Copy link
Contributor

@erciccione erciccione left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the "_tr" suffix to signal that they're the translated versions

I think this approach is confusing. Wouldn't be better to have a folder called i18n or something like that, where put all the translations? There could be a folder called pt-pt and all the portuguese translations could go in there, same for the other languages.

could we change the pt_PT directory to just pt? I think it would help URLs would look cleaner.

I agree with @huey735, better use pt_PT, it's a better standard and avoid problems in the future (same potential issue with Chinese)

do we want to keep URLs in English?

I think they should be kept in english.

@huey735
Copy link
Contributor Author

huey735 commented Jul 9, 2019

@erciccione due to Jekyll (or my understand of it) certain files need to stay on certain folders so I figured it'd be better to keep them next to original and just add the suffix "_tr" to highlight that they're the translated versions. And these files won't relate to a single language.
The "_tr" files inside /_data will include all the translations for each language each and those inside /_includes will have the English text replaced with Liquid tags pointing them to the respective .yml language file inside /_data.
And this is just for the .html and .yml files. There will still exist language folders in the root for each language. Inside them you'll find the copy of the translated files and images. This isn't up to date but it may give you a sense of the architecture I had in mind - https://github.com/huey735/huey735.github.io

I'm still learning Jekyll and Liquid and I followed this suggested method - sylvaindurand.org/making-jekyll-multilingual/. It seems less intrusive than other methods available for translation. I've been looking at them and maybe in the future with a reconstruction of the website other methods will be more appropriate.

I think they should be kept in english.
Maybe we should have a vote on this. I think this has gone back and forward a couple times.

@m52go
Copy link
Contributor

m52go commented Jul 10, 2019

Looks good to me overall. My biggest concern remains long-term maintainability, but I think that can only be rectified by formatting all website content in markdown instead of HTML (e.g., that's how the plugin @erciccione suggested seems to work).

better use pt_PT, it's a better standard and avoid problems in the future

Understood...I didn't realize some languages will need more than one option. Could we turn the underscore into a dash (e.g., pt_PT to pt-PT)? I think it looks a lot cleaner, and the vast majority of our URLs and redirects use dashes.

do we want to keep URLs in English?

I went back and checked the call...looks like we agreed to keep URLs in English? See this clip from the last translator call:

https://youtu.be/K1TG-_ISj2w?t=2220

Looking at other sites, that seems to be the standard. It also seems more intuitive to me.

@huey735
Copy link
Contributor Author

huey735 commented Jul 10, 2019

Could we turn the underscore into a dash

Sure

@m52go
Copy link
Contributor

m52go commented Jul 17, 2019

@huey735 looks good. I just resolved a merge conflict related to the software release from yesterday.

One item: I noticed in two places there's a Front Matter attribute ref with the value donwloads. Is that a mistake?

@m52go
Copy link
Contributor

m52go commented Jul 17, 2019

@huey735 for future reference...GitHub does weird things when the name of the branch you want to merge is also called master (case in point: here's my commit that fixed the merge conflict...only made one small change, but there's a lot more there that's unrelated to this PR).

Next time please call your forked branch something other than master 🙂

@huey735
Copy link
Contributor Author

huey735 commented Jul 17, 2019

@m52go can you point me to these front matters? Sorry for the poor naming of the branch.

downloads.html Outdated Show resolved Hide resolved
pt-PT/downloads.html Outdated Show resolved Hide resolved
@m52go
Copy link
Contributor

m52go commented Jul 17, 2019

@huey735 just added comments. I didn't fix myself because I wasn't sure if they were connected to something else.

@m52go
Copy link
Contributor

m52go commented Jul 17, 2019

ACK

@m52go m52go merged commit 94a10af into bisq-network:master Jul 17, 2019
@m52go m52go mentioned this pull request Aug 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants