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

Multilanguage #58

Merged
merged 106 commits into from
Feb 11, 2018
Merged

Multilanguage #58

merged 106 commits into from
Feb 11, 2018

Conversation

statnmap
Copy link
Contributor

This allows for translation in custom languages.

  • Some texts of the themes where hard-coded in English. These have been moved to a en.toml file in the folder i18n. A French translation is also provided.
  • To go further, I added flags to link the different translations between them. There is a flag in the side bar and in each post header.
  • To add translations of other languages than FR and EN, one should add the flag in the appropriate folder and add lang.toml in the i18n directory.
  • I modified the config.toml in the exampleSite to show multilanguage menus.

@pacollins
Copy link
Collaborator

Want to get a couple reviews from people to confirm this is working properly before merging.

@pacollins
Copy link
Collaborator

I am so far behind with staying up to date to this (thanks Teaching Practicum). Can anyone @statnmap or @blgo give me a quick status update?

Are all the templates updated for ML?
Is everything functional?
Is everything thematically coherent and aesthetically pleasing?
What is the status for its viability to merge?
Can we double back over to make sure the Merges just made aren't affected by this?

Pagination translatios
NavBar dynamic titles translations:
  * taxonomies need i18n translation to display "Categories"
translations
  * category taxonomy terms do not need a translation because this will be should be
already translated for each language in their respective *.lang.md file.
Translations to category taxonomy templates
@blgo
Copy link

blgo commented Jan 22, 2018

There is still some discussion around the language switch design, but apart from that I am awaiting for my 3 pull requests to be merged into Multilanguage

I have merged all my pull requests on top of statnmap's multilanguage branch and this is the result:
https://demo-hugo-future-imperfect-multilanguage.netlify.com/

Everything that does not belong to a content markdown file is now translated.

@statnmap
Copy link
Contributor Author

@pacollins

Once you have a look at these two PR, I would suggest to merge the multilanguage PR into the master, because all following modifications of your code may be different using the multilanguage. I think about relURl and relLangURL for instance. As well as some translations.

@statnmap
Copy link
Contributor Author

@pacollins
I merged all the pull requests of @blgo so that it is easier for you to see and test on my multilanguage branch directly.
You can still have a look at these:

I think we may warn the template users that if they use custom taxonomies, they will have to add them in the i18n files like category/categories.

@pacollins
Copy link
Collaborator

pacollins commented Feb 9, 2018

@statnmap and @blgo Sorry, I have fallen behind on this. I will review this all this weekend.

Maybe we should look into an svg flag set that can be included with ML sites, but left out of regular sites? I have stumbled on flag-icon-css or semantic-ui flags - just the css is located at https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.14/components/flag.min.css and the flags are at https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.14/themes/default/assets/images/flags.png.

That might add some clarity to the menu to free up space to add a down arrow. I'm impartial to sprite vs SVG.

EDIT: Since it seems we are really close, I am going to freeze all PRs until this is finished. I know that, since this is rather large, it can be hard to keep making updates based on things on the master.

@pacollins
Copy link
Collaborator

pacollins commented Feb 9, 2018

Sorry to double post. @statnmap, can you change the base branch of this PR to the new multilingual branch? I will be able to expedite its merge which will allow us to work on smaller chunks with more clarity which should help make the final push into the master.

EDIT: I realized I am powerful in this Repo and could do that myself. 😆

Pending comments from either of you, I will merge this into the new branch for easier and clearer testing.

@pacollins pacollins changed the base branch from master to multilingual February 9, 2018 03:30
@statnmap
Copy link
Contributor Author

statnmap commented Feb 11, 2018

I think the project is mature enough to be merged, despite some minor previous comments.
And yes, working on a branch will be easier as we can define some specific issues and other PR.
So, you can merge...

@pacollins pacollins merged commit 9bc101c into jpescador:multilingual Feb 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants