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

Centralized languages into 1 files #1818

Merged
merged 3 commits into from
Apr 26, 2018

Conversation

ZeroX-DG
Copy link
Member

This PR centralized all languages into 1 file so that next time you want to add a new language just add it to the Languages.js file.

@kazup01 kazup01 added the awaiting review ❇️ Pull request is awaiting a review. label Apr 17, 2018
@sosukesuzuki sosukesuzuki self-requested a review April 24, 2018 10:21
Copy link
Member

@sosukesuzuki sosukesuzuki left a comment

Choose a reason for hiding this comment

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

please confirm my reviews!

<option value='ru'>{i18n.__('Russian')}</option>
<option value='es-ES'>{i18n.__('Spanish')}</option>
{
languages.map((language) => {
Copy link
Member

Choose a reason for hiding this comment

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

() for a single argument and return are unnecessary in arrow functions.
please rewrite like below:

languages.map(language =>
  <option value={language.locale} key={language.locale}>{i18n.__(language.name)}</option>)

@@ -1,11 +1,17 @@
const path = require('path')
const { remote } = require('electron')
const { app } = remote
const { languages } = require('./Languages.js')

let locales = languages.reduce(function (localeList, locale) {
Copy link
Member

Choose a reason for hiding this comment

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

locales is never reassigned. Please use const instead of let.

Copy link
Member

Choose a reason for hiding this comment

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

And this duplicates with this lines.
Please export locales from this file and import locales from this file in browser/main/Main.js.

'ru',
'es-ES'
]
let locales = languages.reduce(function (localeList, locale) {
Copy link
Member

Choose a reason for hiding this comment

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

please confirm this review

@ZeroX-DG
Copy link
Member Author

@sosukesuzuki please confirm my changes

@sosukesuzuki
Copy link
Member

Good! I'll approve!!:+1:

@sosukesuzuki sosukesuzuki removed the awaiting review ❇️ Pull request is awaiting a review. label Apr 24, 2018
@kazup01 kazup01 self-requested a review April 26, 2018 13:26
Copy link
Member

@kazup01 kazup01 left a comment

Choose a reason for hiding this comment

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

LGTM

@kazup01 kazup01 merged commit ab393b1 into BoostIO:master Apr 26, 2018
@kazup01
Copy link
Member

kazup01 commented Apr 26, 2018

Merged. Thank you for amazing contribution @ZeroX-DG !

@ZeroX-DG ZeroX-DG deleted the fix-centralize-language branch April 30, 2018 15:13
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