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

Translations (looking for contributors) #345

Open
nukeop opened this issue Jun 5, 2019 · 16 comments

Comments

Projects
None yet
5 participants
@nukeop
Copy link
Owner

commented Jun 5, 2019

We're looking for contributors who are willing to translate Nuclear to their native languages (or any languages that they know well). Currently @charjac has done all the work required to add new translations, and also translated all the strings to French.

New locales should be placed here: https://github.com/nukeop/nuclear/tree/master/app/locales

Languages currently available:

Partial translations:

Proposed:

@charjac

This comment has been minimized.

Copy link
Collaborator

commented Jun 6, 2019

When adding translations, a few things need to be done:

  • add the json file with the correct name in app/locales and keep it empty
  • update the i18n script in package.json by adding your locale
{
  ...
  "scripts": {
    ...
     "i18n": "sync-i18n --files 'app/locales/*.json' --primary en --languages fr [your locale] --space 2"
  } 
  ...
}
  • run the command
npm run i18n
  • edit the file app/constants/settings.js to add your local in user's choice
  {
    name: 'language',
    category: 'program-settings',
    type: settingType.LIST,
    prettyName: 'language',
    placeholder: 'language-placeholder',
    options: ['en', 'fr', <your locale>],
    default: undefined
  }
  • edit the app/i18n.js file
...
import en from './locales/en.json';
import <your locale> from './locales/<your locale>.json';
...
    resources: {
      en,
      ...
      <your locale>
    },
...

you can now translate your locale file from english to your language.

@Hansen1992

This comment has been minimized.

Copy link
Contributor

commented Jun 10, 2019

Hey @nukeop, I would like to help you translate Nuclear from English to Danish if this has any interest?

@nukeop

This comment has been minimized.

Copy link
Owner Author

commented Jun 10, 2019

Absolutely, in general if you don't see a language on the list above, we want it added. Thanks for the help.

@lizzyd710

This comment has been minimized.

Copy link
Contributor

commented Jun 11, 2019

What kind of things or phrases would you like to be translated? I'm a native English speaker but I took a few years of Chinese (Mandarin, so I write simplified). I may not be able to do much, but I would be happy to start and do as much as I can.

@nukeop

This comment has been minimized.

Copy link
Owner Author

commented Jun 11, 2019

You can see a list of all strings that have to be translated here: https://github.com/nukeop/nuclear/blob/master/app/locales/en.json

Even if you only translate a part of it, any missing strings fall back on default English. And some is better than nothing.

@lizzyd710

This comment has been minimized.

Copy link
Contributor

commented Jun 12, 2019

(This might not be the appropriate place for this, so I apologize and let me know if/where you want me to move this.) Do I need to run npm run i18n before editing app/constants/settings.js and app/i18n.js? I'm having some issues with setting up the NPM dev environment for working on this repo, and I'm wondering if I could just edit the files in the meantime to try and get started on the translations while I troubleshoot.

@charjac

This comment has been minimized.

Copy link
Collaborator

commented Jun 12, 2019

npm run i18n just fill the new json file with english translation.
you can copy paste en.json content to (your locale).json, it will do the same.

wich error do you get when you setup dev environment ?

@lizzyd710

This comment has been minimized.

Copy link
Contributor

commented Jun 13, 2019

(If I should have posted this in pastebin or something else, let me know. I know different repos have different protocols for this type of thing.)
image

@charjac

This comment has been minimized.

Copy link
Collaborator

commented Jun 13, 2019

arf windows :'( :'(

There is a few things you can try:

  • run your cmd as administrator
  • delete node_modules and then run npm install
  • maybe try gitbash ?
  • help !!! :)
@nukeop

This comment has been minimized.

Copy link
Owner Author

commented Jun 13, 2019

I think it's a matter of running npm install first.

@lizzyd710

This comment has been minimized.

Copy link
Contributor

commented Jun 13, 2019

Yeah, I reinstalled and it loaded, it's just stuck on the nuclear logo screen. Would I be able to run the i18n command though, or do I need to figure out why the app isn't loading first? (Again, sorry for clogging up this issue. Is there a better place for me to go for this, or is here fine?)

@lizzyd710

This comment has been minimized.

Copy link
Contributor

commented Jun 13, 2019

So, I was afraid this would be an issue with translating to Chinese, but even when I save the zh.json file with Unicode encoding it doesn't properly parse...how should I go about trying to handle this?

@nukeop

This comment has been minimized.

Copy link
Owner Author

commented Jun 13, 2019

Talking about it here is fine. Could you start a pull request with the changes you've made so far so I can pull them and check? Maybe it'll work fine for me, and even if it doesn't I'll be in a better position to judge what's wrong.

@ramstore07

This comment has been minimized.

Copy link

commented Jun 14, 2019

Hey there! I would like to translate it to Russian! Let me know what you think!

@nukeop

This comment has been minimized.

Copy link
Owner Author

commented Jun 14, 2019

Sure, this is a great idea. Let me know if there are any problems.

@lizzyd710

This comment has been minimized.

Copy link
Contributor

commented Jun 15, 2019

Talking about it here is fine. Could you start a pull request with the changes you've made so far so I can pull them and check? Maybe it'll work fine for me, and even if it doesn't I'll be in a better position to judge what's wrong.

I think I figured it out. I saved it with Unicode encoding but I should have saved it as UTF-8. sigh

Now I just have to figure out how to actually get the program to get past the logo and I can test and submit a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.