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

Allow developers to split translation files into separate directories, etc. #71

Closed
wants to merge 5 commits into from

Conversation

kuroda
Copy link
Contributor

@kuroda kuroda commented Apr 26, 2012

With this pull request I want to introduce a new way of translation management into spree_i18n project. With this developers can:

  1. put their translation files in a separate directory such as config/locales/ja so that they can manage them by submodule.
  2. load only selected locale files with a new configuration option i18n.avaiable_locales.
  3. test the integrity and completeness of their translations with RSpec examples.

I borrowed the basic idea from the rails-i18n project.

firstname: "名"
last_name_begins_with: "性が何から始まる"
first_name_start: "First Name Begins With"
Copy link
Contributor

Choose a reason for hiding this comment

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

This translation has been reverted to english. Why?

@@ -660,8 +656,10 @@ ja:
payment_methods: "支払い方法"
payment_methods_setting_description: "支払い方法を管理"
payment_processing_failed: "決済が失敗しました。入力した情報を確認してから再び決済を行ってみて下さい。"
payment_processor_choose_banner_text: "If you need help choosing a payment processor, please visit"
payment_processor_choose_link: "our payments page"
Copy link
Contributor

Choose a reason for hiding this comment

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

English.

@radar
Copy link
Contributor

radar commented Apr 26, 2012

Okay... I feel like I'm just typing the same thing over and over there. Please make sure that all the translations that you are adding to this file are in the correct language. There are a huge number of translations that are supposed to be for Japanese that are still in English. If you can fix this error then I can pull this in.

@radar radar closed this Apr 26, 2012
@radar radar reopened this Apr 26, 2012
@kuroda
Copy link
Contributor Author

kuroda commented Apr 26, 2012

@radar

The translation file of Spree is quite a big and I thought that I could continue my job after this pull request was accepted.

The main motivation of this pull request is to provide RSpec examples to ease the translation process. I have to fill in the original English word or phrase for the key that I can not provide its translation immediately.

I reverted some dubious translations to English. That does not mean that they are wrong. I just thought that we should check them.

Besides, the original file has many missing translations that are just replaced by the default English words and phrases.

Because It is a huge task to translate them all, please be lenient a little bit to accept my pull request as a start point. I will complete them as soon as possible.

@schof
Copy link
Contributor

schof commented Apr 27, 2012

@radar I agree with @kuroda. Its a huge job to translate the whole file. We wouldn't deny a pull request that partially upgraded to Rails 3.2 for instance. We just say thank you for taking us this far.

@kuroda
Copy link
Contributor Author

kuroda commented Apr 27, 2012

@schof

Thanks a lot for your comment.

I just started translations but I encountered many difficulties due to the grammatical difference between English and our language like #72. I also found that some words and phrases are difficult to translate because of the difference of commercial practice.

@radar Please understand that it is much better to leave some words in English than to give wrong or awkward translations, which could give new Spree users the impression that Spree itself is immature product.

@parndt
Copy link

parndt commented Apr 27, 2012

In my experience, the problem with adding English to locale files that aren't English is they get forgotten about. If you want to fallback to English, configure it using i18n fallback rather than duplicating English.

@kuroda
Copy link
Contributor Author

kuroda commented Apr 27, 2012

@parndt

Thanks for your advice, but that is contrary to my experience.

Alphabets are very distinctive in the Japanese ideograms. We can't forget about them;)

The question here is how we manage such a large set of translations efficiently. When a future version of Spree adds or removes some translation keys, I want to know which is missing and which is redundant.

Basically, I don't need to fallback to English. Everything should be translated. Only exception I found so far is powered_by, which is not translated into Japanese usually.

I filled my locale files with default English words so that I could test its integrity with rake spec.

If my practice bothers other collaborators, I will examine if there is another way of translation management.

@kuroda
Copy link
Contributor Author

kuroda commented May 3, 2012

I submitted another pull request.

@kuroda kuroda closed this May 3, 2012
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.

4 participants