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

Add Russian locale #493

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions examples/app-npm-webpack/messages/ru.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"ru": {
"intro-1": "Используйте Globalize для интернационализиции вашего приложения.",
"number-label": "Число",
"currency-label": "Валюта",
"date-label": "Дата",
"relative-time-label": "Относительное время",
"message-1": "Пример сообщения со смешанными числами \"{number}\", валютой \"{currency}\", датами \"{date}\" и относительным временем \"{relativeTime}\".",
"message-2": [
"Пример сообщения с поддержкой множественного числа:",
"{count, plural,",
" one {У вас осталась одна задача}",
" many {У вас осталось # задач}",

Choose a reason for hiding this comment

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

You've missed the "few" class. Please refer to the table here: http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#ru

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should it be picked up by other?

Choose a reason for hiding this comment

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

Well, it might be. But I'd rather put in all the classes, this is an example and it should not contain ambiguities or unclear defaults.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rxaviers what is your preference?

Copy link
Member

Choose a reason for hiding this comment

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

@markelog, technically you are correct other would pick it up.

I tend to agree with @sompylasar that it's good to make all ru forms explicit: i.e., one, few, many, other for the clarity of the demo.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Member

Choose a reason for hiding this comment

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

Thanks!

" few {У вас осталось # задачи}",
" other {У вас осталось # задачи}",
"}."
]
}
}
4 changes: 2 additions & 2 deletions examples/app-npm-webpack/webpack-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ module.exports = {
new GlobalizePlugin({
production: options.production,
developmentLocale: "en",
supportedLocales: [ "ar", "de", "en", "es", "pt", "zh" ],
supportedLocales: ["ar", "de", "en", "es", "pt", "ru", "zh"],
messages: "messages/[locale].json",
output: "i18n/[locale].[hash].js"
})

].concat( options.production ? [
new webpack.optimize.DedupePlugin(),
new CommonsChunkPlugin( "vendor", "vendor.[hash].js" ),
Expand Down