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

initial internationalization commit with jquery.i18n plugin #46

Merged
merged 1 commit into from
Oct 3, 2014
Merged

initial internationalization commit with jquery.i18n plugin #46

merged 1 commit into from
Oct 3, 2014

Conversation

dhpollack
Copy link
Contributor

No description provided.

@PowerLemons
Copy link
Contributor

Could you explain what this plugin does and how it does it please :)?

@dhpollack
Copy link
Contributor Author

The plugin replaces strings (well, a little HTML too) within your HTML templates based on a "dictionary" file that corresponds to a user's language as reported by the browser, or the "lng" parameter in the url. The idea being that you can have many different dictionary files for many different languages and the site will automatically be translated into those languages, but only be required to have one HTML file. If the user's language is not found, then it will default back into English.

https://github.com/wikimedia/jquery.i18n

I exclusively used the data-i18n tag as described in the Data API above.

To make changes to the site, you would need to edit the HTML file as you normally do, and then add/remove/update any of the translations in the default English translation file, en.json. Adding phrases simply requires that you make a new entry in the en.json file that exactly matches the fallback that you put into the HTML file itself.

Then translators would come behind you and translate any changes you made into their respective languages. Or ideally, you would hold back any changes for a couple days and give translators a chance to make the translations into their respective languages before pushing any changes live.

@felixvd
Copy link

felixvd commented Oct 2, 2014

Wouldn't this make changes to the homepage harder in the future? What if the design is changed completely, for example?

@PowerLemons
Copy link
Contributor

@felixvd I reviewed the markup, and it looks like it shouldn't be a problem. It looks like jquery.i89n is easy to implement. If - for say - the design is changed completely, there will be no problem since it's just a JS file.

@dhpollack If you can get your pull request to automatically merge, I'll merge the pull request :)

@dhpollack
Copy link
Contributor Author

@PowerLemons I'll work on it and try to get something out today.

@PowerLemons
Copy link
Contributor

Great. The only reason why this PR is conflicting is because of PR #47, which simply changed a link on line 189 of /index.html.

It should be an easy fix.

@dhpollack
Copy link
Contributor Author

@PowerLemons I noticed that. I'm not a git expert, but I think that I got it. However, related to that Block.io issue, the getting started page has an entire modal that needs to be changed from DogeAPI to Block.io. It's not within the scope of this PR so I decided to leave it alone.

@PowerLemons
Copy link
Contributor

I'll update the DogeAPI page on the Getting Started to be Block.io instead later when I have the time. Thank you for making this pull request. Pull request merged.

PowerLemons added a commit that referenced this pull request Oct 3, 2014
initial internationalization commit with jquery.i18n plugin
@PowerLemons PowerLemons merged commit ed31c8c into dogecoin:gh-pages Oct 3, 2014
@dhpollack
Copy link
Contributor Author

@PowerLemons ach! For some reason it didn't add the internationalization JS to the main page. Something must have happened when I used the merge tool. Let me quickly try to fix this. Fortunately, this doesn't "break" anything, but internationalization won't work on the main page until it's added.

@PowerLemons
Copy link
Contributor

I'll commit the fix when you're done :)

@dhpollack dhpollack deleted the dhpollack/internationalization branch October 3, 2014 20:25
@PowerLemons PowerLemons mentioned this pull request Oct 3, 2014
Closed
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.

None yet

3 participants