Parcourir la source

Rename ru locale to ru_RU, in line with en_US

Kevin van Zonneveld il y a 9 ans
Parent
commit
bee76d5525

+ 2 - 2
src/locales/index.js

@@ -1,8 +1,8 @@
 // Parent
 // Parent
 import en_US from './en_US'
 import en_US from './en_US'
-import ru from './ru'
+import ru_RU from './ru_RU'
 
 
 export default {
 export default {
   en_US,
   en_US,
-  ru
+  ru_RU
 }
 }

+ 5 - 5
src/locales/ru.js → src/locales/ru_RU.js

@@ -1,6 +1,6 @@
-const ru = {}
+const ru_RU = {}
 
 
-ru.strings = {
+ru_RU.strings = {
   chooseFile: 'Выберите файл',
   chooseFile: 'Выберите файл',
   orDragDrop: 'или перенесите его сюда',
   orDragDrop: 'или перенесите его сюда',
   youHaveChosen: 'Вы выбрали: %{file_name}',
   youHaveChosen: 'Вы выбрали: %{file_name}',
@@ -12,7 +12,7 @@ ru.strings = {
   upload: 'Загрузить'
   upload: 'Загрузить'
 }
 }
 
 
-ru.pluralize = function (n) {
+ru_RU.pluralize = function (n) {
   if (n % 10 === 1 && n % 100 !== 11) {
   if (n % 10 === 1 && n % 100 !== 11) {
     return 0
     return 0
   }
   }
@@ -25,7 +25,7 @@ ru.pluralize = function (n) {
 }
 }
 
 
 if (typeof window !== 'undefined' && typeof window.Uppy !== 'undefined') {
 if (typeof window !== 'undefined' && typeof window.Uppy !== 'undefined') {
-  window.Uppy.locales.ru = ru
+  window.Uppy.locales.ru_RU = ru_RU
 }
 }
 
 
-export default ru
+export default ru_RU

+ 2 - 2
test/translator.spec.js

@@ -2,7 +2,7 @@ var test = require('tape')
 var Core = require('../src/core/index.js')
 var Core = require('../src/core/index.js')
 
 
 test('translation', function (t) {
 test('translation', function (t) {
-  const russian = require('../src/locales/ru.js')
+  const russian = require('../src/locales/ru_RU.js')
   const core = new Core({locales: russian})
   const core = new Core({locales: russian})
 
 
   t.equal(
   t.equal(
@@ -28,7 +28,7 @@ test('interpolation', function (t) {
 })
 })
 
 
 test('pluralization', function (t) {
 test('pluralization', function (t) {
-  const russian = require('../src/locales/ru.js')
+  const russian = require('../src/locales/ru_RU.js')
   const core = new Core({locales: russian})
   const core = new Core({locales: russian})
 
 
   t.equal(
   t.equal(

+ 2 - 2
website/src/examples/i18n/app.es6

@@ -1,8 +1,8 @@
 import Uppy from 'uppy/core'
 import Uppy from 'uppy/core'
 import { Tus10 } from 'uppy/plugins'
 import { Tus10 } from 'uppy/plugins'
-import { ru } from 'uppy/locales'
+import { ru_RU } from 'uppy/locales'
 
 
-const uppy = new Uppy({wait: false, locales: ru})
+const uppy = new Uppy({wait: false, locales: ru_RU})
 
 
 uppy
 uppy
   .use(Tus10, {endpoint: 'http://master.tus.io:8080/files/'})
   .use(Tus10, {endpoint: 'http://master.tus.io:8080/files/'})

+ 2 - 2
website/src/examples/i18n/app.html

@@ -5,9 +5,9 @@
 
 
 <!-- Load Uppy pre-built bundled version and Russian language pack -->
 <!-- Load Uppy pre-built bundled version and Russian language pack -->
 <script src="/uppy/uppy.js"></script>
 <script src="/uppy/uppy.js"></script>
-<script src="/uppy/locales/ru.js"></script>
+<script src="/uppy/locales/ru_RU.js"></script>
 <script>
 <script>
-  var uppy = new Uppy.Core({locales: Uppy.locales.ru});
+  var uppy = new Uppy.Core({locales: Uppy.locales.ru_RU});
   uppy.use(Uppy.plugins.DragDrop, {target: '.UppyDragDrop-form'});
   uppy.use(Uppy.plugins.DragDrop, {target: '.UppyDragDrop-form'});
   uppy.use(Uppy.plugins.Tus10, {endpoint: 'http://master.tus.io:8080/files/'});
   uppy.use(Uppy.plugins.Tus10, {endpoint: 'http://master.tus.io:8080/files/'});
   uppy.run();
   uppy.run();