From 063859160df59c97f5f57bb118ea51740b2d3d4a Mon Sep 17 00:00:00 2001 From: Kevin Brown Date: Wed, 7 Jan 2015 20:39:29 -0500 Subject: [PATCH] Add a few translations, label the others --- dist/js/i18n/sr.js | 1 + dist/js/i18n/vi.js | 1 + dist/js/i18n/zh-TW.js | 1 + dist/js/select2.amd.full.js | 1 + dist/js/select2.amd.js | 1 + dist/js/select2.full.js | 1 + dist/js/select2.js | 1 + src/js/select2/i18n/az.js | 1 + src/js/select2/i18n/bg.js | 1 + src/js/select2/i18n/da.js | 1 + src/js/select2/i18n/de.js | 1 + src/js/select2/i18n/en.js | 1 + src/js/select2/i18n/es.js | 1 + src/js/select2/i18n/et.js | 1 + src/js/select2/i18n/eu.js | 1 + src/js/select2/i18n/fi.js | 1 + src/js/select2/i18n/fr.js | 1 + src/js/select2/i18n/gl.js | 1 + src/js/select2/i18n/hr.js | 1 + src/js/select2/i18n/hu.js | 1 + src/js/select2/i18n/id.js | 1 + src/js/select2/i18n/is.js | 1 + src/js/select2/i18n/lt.js | 3 ++- src/js/select2/i18n/lv.js | 1 + src/js/select2/i18n/mk.js | 1 + src/js/select2/i18n/nb.js | 1 + src/js/select2/i18n/ro.js | 1 + src/js/select2/i18n/ru.js | 1 + src/js/select2/i18n/sk.js | 2 ++ src/js/select2/i18n/sr.js | 52 ++++++++++++++++++++++++++++++++++++ src/js/select2/i18n/th.js | 1 + src/js/select2/i18n/tr.js | 1 + src/js/select2/i18n/uk.js | 1 + src/js/select2/i18n/vi.js | 37 +++++++++++++++++++++++++ src/js/select2/i18n/zh-TW.js | 33 +++++++++++++++++++++++ 35 files changed, 156 insertions(+), 1 deletion(-) create mode 100644 dist/js/i18n/sr.js create mode 100644 dist/js/i18n/vi.js create mode 100644 dist/js/i18n/zh-TW.js create mode 100644 src/js/select2/i18n/sr.js create mode 100644 src/js/select2/i18n/vi.js create mode 100644 src/js/select2/i18n/zh-TW.js diff --git a/dist/js/i18n/sr.js b/dist/js/i18n/sr.js new file mode 100644 index 00000000..db7fbed1 --- /dev/null +++ b/dist/js/i18n/sr.js @@ -0,0 +1 @@ +window.$=window.$||{},function(){$&&$.fn&&$.fn.select2&&$.fn.select2.amd&&(define=$.fn.select2.amd.define,require=$.fn.select2.amd.require),define("select2/i18n/sr",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Obrišite "+n+" simbol";return r+=e(n,"","a","a"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Ukucajte bar još "+n+" simbol";return r+=e(n,"","a","a"),r},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(t){var n="Možete izabrati samo "+t.maximum+" stavk";return n+=e(t.maximum,"u","e","i"),n},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"}}}),require("jquery.select2"),$.fn.select2.amd={define:define,require:require}}(); \ No newline at end of file diff --git a/dist/js/i18n/vi.js b/dist/js/i18n/vi.js new file mode 100644 index 00000000..81f33046 --- /dev/null +++ b/dist/js/i18n/vi.js @@ -0,0 +1 @@ +window.$=window.$||{},function(){$&&$.fn&&$.fn.select2&&$.fn.select2.amd&&(define=$.fn.select2.amd.define,require=$.fn.select2.amd.require),define("select2/i18n/vi",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vui lòng nhập ít hơn "+t+" ký tự";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vui lòng nhập nhiều hơn "+t+' ký tự"';return n},loadingMore:function(){return"Đang lấy thêm kết quả…"},maximumSelected:function(e){var t="Chỉ có thể chọn được "+e.maximum+" lựa chọn";return t},noResults:function(){return"Không tìm thấy kết quả"},searching:function(){return"Đang tìm…"}}}),require("jquery.select2"),$.fn.select2.amd={define:define,require:require}}(); \ No newline at end of file diff --git a/dist/js/i18n/zh-TW.js b/dist/js/i18n/zh-TW.js new file mode 100644 index 00000000..dbb27550 --- /dev/null +++ b/dist/js/i18n/zh-TW.js @@ -0,0 +1 @@ +window.$=window.$||{},function(){$&&$.fn&&$.fn.select2&&$.fn.select2.amd&&(define=$.fn.select2.amd.define,require=$.fn.select2.amd.require),define("select2/i18n/zh-TW",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="請刪掉"+t+"個字元";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="請再輸入"+t+"個字元";return n},loadingMore:function(){return"載入中…"},maximumSelected:function(e){var t="你只能選擇最多"+e.maximum+"項";return t},noResults:function(){return"沒有找到相符的項目"},searching:function(){return"搜尋中…"}}}),require("jquery.select2"),$.fn.select2.amd={define:define,require:require}}(); \ No newline at end of file diff --git a/dist/js/select2.amd.full.js b/dist/js/select2.amd.full.js index 2f86811a..d305f468 100644 --- a/dist/js/select2.amd.full.js +++ b/dist/js/select2.amd.full.js @@ -3237,6 +3237,7 @@ define('select2/dropdown/minimumResultsForSearch',[ }); define('select2/i18n/en',[],function () { + // English return { errorLoading: function () { return 'The results could not be loaded.'; diff --git a/dist/js/select2.amd.js b/dist/js/select2.amd.js index 7e9fb0c6..79c69796 100644 --- a/dist/js/select2.amd.js +++ b/dist/js/select2.amd.js @@ -3237,6 +3237,7 @@ define('select2/dropdown/minimumResultsForSearch',[ }); define('select2/i18n/en',[],function () { + // English return { errorLoading: function () { return 'The results could not be loaded.'; diff --git a/dist/js/select2.full.js b/dist/js/select2.full.js index d7ef855c..f2953aa7 100644 --- a/dist/js/select2.full.js +++ b/dist/js/select2.full.js @@ -12772,6 +12772,7 @@ define('select2/dropdown/minimumResultsForSearch',[ }); define('select2/i18n/en',[],function () { + // English return { errorLoading: function () { return 'The results could not be loaded.'; diff --git a/dist/js/select2.js b/dist/js/select2.js index 55607105..dad8b072 100644 --- a/dist/js/select2.js +++ b/dist/js/select2.js @@ -3665,6 +3665,7 @@ define('select2/dropdown/minimumResultsForSearch',[ }); define('select2/i18n/en',[],function () { + // English return { errorLoading: function () { return 'The results could not be loaded.'; diff --git a/src/js/select2/i18n/az.js b/src/js/select2/i18n/az.js index e7f19383..0d9bda43 100644 --- a/src/js/select2/i18n/az.js +++ b/src/js/select2/i18n/az.js @@ -1,4 +1,5 @@ define(function () { + // Azerbaijani return { inputTooLong: function (args) { var overChars = args.input.length - args.maximum; diff --git a/src/js/select2/i18n/bg.js b/src/js/select2/i18n/bg.js index 9e849a3b..909b4e55 100644 --- a/src/js/select2/i18n/bg.js +++ b/src/js/select2/i18n/bg.js @@ -1,4 +1,5 @@ define(function () { + // Bulgarian return { inputTooLong: function (args) { var overChars = args.input.length - args.maximum; diff --git a/src/js/select2/i18n/da.js b/src/js/select2/i18n/da.js index 7c10b993..2488a43f 100644 --- a/src/js/select2/i18n/da.js +++ b/src/js/select2/i18n/da.js @@ -1,4 +1,5 @@ define(function () { + // Danish return { errorLoading: function () { return 'The results could not be loaded.'; diff --git a/src/js/select2/i18n/de.js b/src/js/select2/i18n/de.js index 9a91066a..cbcef8d2 100644 --- a/src/js/select2/i18n/de.js +++ b/src/js/select2/i18n/de.js @@ -1,4 +1,5 @@ define(function () { + // German return { inputTooLong: function (args) { var overChars = args.input.length - args.maximum; diff --git a/src/js/select2/i18n/en.js b/src/js/select2/i18n/en.js index 720a0f04..f226f2c6 100644 --- a/src/js/select2/i18n/en.js +++ b/src/js/select2/i18n/en.js @@ -1,4 +1,5 @@ define(function () { + // English return { errorLoading: function () { return 'The results could not be loaded.'; diff --git a/src/js/select2/i18n/es.js b/src/js/select2/i18n/es.js index df97a97e..87b7a8a5 100644 --- a/src/js/select2/i18n/es.js +++ b/src/js/select2/i18n/es.js @@ -1,4 +1,5 @@ define(function () { + // Spanish return { errorLoading: function () { return 'La carga falló'; diff --git a/src/js/select2/i18n/et.js b/src/js/select2/i18n/et.js index 3103192d..d546ade2 100644 --- a/src/js/select2/i18n/et.js +++ b/src/js/select2/i18n/et.js @@ -1,4 +1,5 @@ define(function () { + // Estonian return { inputTooLong: function (args) { var overChars = args.input.length - args.maximum; diff --git a/src/js/select2/i18n/eu.js b/src/js/select2/i18n/eu.js index 998d8bbe..0359f687 100644 --- a/src/js/select2/i18n/eu.js +++ b/src/js/select2/i18n/eu.js @@ -1,4 +1,5 @@ define(function () { + // Basque return { inputTooLong: function (args) { var overChars = args.input.length - args.maximum; diff --git a/src/js/select2/i18n/fi.js b/src/js/select2/i18n/fi.js index af5df345..0984d249 100644 --- a/src/js/select2/i18n/fi.js +++ b/src/js/select2/i18n/fi.js @@ -1,4 +1,5 @@ define(function () { + // Finnish return { inputTooLong: function (args) { var overChars = args.input.length - args.maximum; diff --git a/src/js/select2/i18n/fr.js b/src/js/select2/i18n/fr.js index 43478250..d6e8cff8 100644 --- a/src/js/select2/i18n/fr.js +++ b/src/js/select2/i18n/fr.js @@ -1,4 +1,5 @@ define(function () { + // French return { inputTooLong: function (args) { var overChars = args.input.length - args.maximum; diff --git a/src/js/select2/i18n/gl.js b/src/js/select2/i18n/gl.js index ac9eb5f5..46ac07c8 100644 --- a/src/js/select2/i18n/gl.js +++ b/src/js/select2/i18n/gl.js @@ -1,4 +1,5 @@ define(function () { + // Galician return { inputTooLong: function (args) { var overChars = args.input.length - args.maximum; diff --git a/src/js/select2/i18n/hr.js b/src/js/select2/i18n/hr.js index 63c525db..3c2b85a0 100644 --- a/src/js/select2/i18n/hr.js +++ b/src/js/select2/i18n/hr.js @@ -1,4 +1,5 @@ define(function () { + // Croatian function character (n) { var message = ' ' + n + ' znak'; diff --git a/src/js/select2/i18n/hu.js b/src/js/select2/i18n/hu.js index 92202671..371ff5d3 100644 --- a/src/js/select2/i18n/hu.js +++ b/src/js/select2/i18n/hu.js @@ -1,4 +1,5 @@ define(function () { + // Hungarian return { inputTooLong: function (args) { var overChars = args.input.length - args.maximum; diff --git a/src/js/select2/i18n/id.js b/src/js/select2/i18n/id.js index 9b729b51..c0d03c78 100644 --- a/src/js/select2/i18n/id.js +++ b/src/js/select2/i18n/id.js @@ -1,4 +1,5 @@ define(function () { + // Indonesian return { inputTooLong: function (args) { var overChars = args.input.length - args.maximum; diff --git a/src/js/select2/i18n/is.js b/src/js/select2/i18n/is.js index c36c155d..c1dacfe5 100644 --- a/src/js/select2/i18n/is.js +++ b/src/js/select2/i18n/is.js @@ -1,4 +1,5 @@ define(function () { + // Icelandic return { inputTooLong: function (args) { var overChars = args.input.length - args.maximum; diff --git a/src/js/select2/i18n/lt.js b/src/js/select2/i18n/lt.js index 5332e622..5b6c2f54 100644 --- a/src/js/select2/i18n/lt.js +++ b/src/js/select2/i18n/lt.js @@ -1,4 +1,5 @@ define(function () { + // Italian function ending (count, first, second, third) { if ((count % 100 > 9 && count % 100 < 21) || count % 10 === 0) { if (count % 10 > 1) { @@ -24,7 +25,7 @@ define(function () { inputTooShort: function (args) { var remainingChars = args.minimum - args.input.length; - var message = 'Įrašykite dar ' + remainingChars + ' simbol'; + var message = 'Įrašykite dar ' + remainingChars + ' simbol'; message += ending(remainingChars, 'ių', 'ius', 'į'); diff --git a/src/js/select2/i18n/lv.js b/src/js/select2/i18n/lv.js index 5067032d..095956e3 100644 --- a/src/js/select2/i18n/lv.js +++ b/src/js/select2/i18n/lv.js @@ -1,4 +1,5 @@ define(function () { + // Latvian function ending (count, eleven, singular, other) { if (count === 11) { return eleven; diff --git a/src/js/select2/i18n/mk.js b/src/js/select2/i18n/mk.js index f55e6e65..611ca6b0 100644 --- a/src/js/select2/i18n/mk.js +++ b/src/js/select2/i18n/mk.js @@ -1,4 +1,5 @@ define(function () { + // Macedonian return { inputTooLong: function (args) { var overChars = args.input.length - args.maximum; diff --git a/src/js/select2/i18n/nb.js b/src/js/select2/i18n/nb.js index 2577efae..59b07400 100644 --- a/src/js/select2/i18n/nb.js +++ b/src/js/select2/i18n/nb.js @@ -1,4 +1,5 @@ define(function () { + // Norwegian (Bokmål) return { inputTooLong: function (args) { var overChars = args.input.length - args.maximum; diff --git a/src/js/select2/i18n/ro.js b/src/js/select2/i18n/ro.js index 46cdd1b6..cb107d0e 100644 --- a/src/js/select2/i18n/ro.js +++ b/src/js/select2/i18n/ro.js @@ -1,4 +1,5 @@ define(function () { + // Romanian return { inputTooLong: function (args) { var overChars = args.input.length - args.maximum; diff --git a/src/js/select2/i18n/ru.js b/src/js/select2/i18n/ru.js index 1945a1e0..ff3ce4e7 100644 --- a/src/js/select2/i18n/ru.js +++ b/src/js/select2/i18n/ru.js @@ -1,4 +1,5 @@ define(function () { + // Russian function ending (count, one, couple, more) { if (n % 10 < 5 && n % 10 > 0 && n % 100 < 5 || n % 100 > 20) { if (n % 10 > 1) { diff --git a/src/js/select2/i18n/sk.js b/src/js/select2/i18n/sk.js index 6d3ddb9d..449754e3 100644 --- a/src/js/select2/i18n/sk.js +++ b/src/js/select2/i18n/sk.js @@ -1,4 +1,6 @@ define(function () { + // Slovak + // use text for the numbers 2 through 4 var smallNumbers = { 2: function (masc) { return (masc ? 'dva' : 'dve'); }, diff --git a/src/js/select2/i18n/sr.js b/src/js/select2/i18n/sr.js new file mode 100644 index 00000000..32e27d59 --- /dev/null +++ b/src/js/select2/i18n/sr.js @@ -0,0 +1,52 @@ +define(function () { + // Serbian + function ending (count, one, some, many) { + if (count % 10 == 1 && count % 100 != 11) { + return one; + } + + if (count % 10 >= 2 && count % 10 <= 4 && + (count % 100 < 12 || count % 100 > 14)) { + return some; + } + + return many; + } + + return { + inputTooLong: function (args) { + var overChars = args.input.length - args.maximum; + + var message = 'Obrišite ' + overChars + ' simbol'; + + message += ending(overChars, '', 'a', 'a'); + + return message; + }, + inputTooShort: function (args) { + var remainingChars = args.minimum - args.input.length; + + var message = 'Ukucajte bar još ' + remainingChars + ' simbol'; + + message += ending(remainingChars, '', 'a', 'a'); + + return message; + }, + loadingMore: function () { + return 'Preuzimanje još rezultata…'; + }, + maximumSelected: function (args) { + var message = 'Možete izabrati samo ' + args.maximum + ' stavk'; + + message += ending(args.maximum, 'u', 'e', 'i'); + + return message; + }, + noResults: function () { + return 'Ništa nije pronađeno'; + }, + searching: function () { + return 'Pretraga…'; + } + }; +}); diff --git a/src/js/select2/i18n/th.js b/src/js/select2/i18n/th.js index a228e441..c13e3f93 100644 --- a/src/js/select2/i18n/th.js +++ b/src/js/select2/i18n/th.js @@ -1,4 +1,5 @@ define(function () { + // Thai return { inputTooLong: function (args) { var overChars = args.input.length - args.maximum; diff --git a/src/js/select2/i18n/tr.js b/src/js/select2/i18n/tr.js index 9d16a147..636132f9 100644 --- a/src/js/select2/i18n/tr.js +++ b/src/js/select2/i18n/tr.js @@ -1,4 +1,5 @@ define(function () { + // Turkish return { inputTooLong: function (args) { var overChars = args.input.length - args.maximum; diff --git a/src/js/select2/i18n/uk.js b/src/js/select2/i18n/uk.js index 27e64acf..092d24fb 100644 --- a/src/js/select2/i18n/uk.js +++ b/src/js/select2/i18n/uk.js @@ -1,4 +1,5 @@ define(function () { + // Ukranian function ending (count, one, couple, more) { if ([11,12,13,14].indexOf(count % 100) !== -1) { return more; diff --git a/src/js/select2/i18n/vi.js b/src/js/select2/i18n/vi.js new file mode 100644 index 00000000..f50ff75b --- /dev/null +++ b/src/js/select2/i18n/vi.js @@ -0,0 +1,37 @@ +define(function () { + // Vietnamese + return { + inputTooLong: function (args) { + var overChars = args.input.length - args.maximum; + + var message = 'Vui lòng nhập ít hơn ' + overChars + ' ký tự'; + + if (overChars != 1) { + message += 's'; + } + + return message; + }, + inputTooShort: function (args) { + var remainingChars = args.minimum - args.input.length; + + var message = 'Vui lòng nhập nhiều hơn ' + remainingChars + ' ký tự"'; + + return message; + }, + loadingMore: function () { + return 'Đang lấy thêm kết quả…'; + }, + maximumSelected: function (args) { + var message = 'Chỉ có thể chọn được ' + args.maximum + ' lựa chọn'; + + return message; + }, + noResults: function () { + return 'Không tìm thấy kết quả'; + }, + searching: function () { + return 'Đang tìm…'; + } + }; +}); diff --git a/src/js/select2/i18n/zh-TW.js b/src/js/select2/i18n/zh-TW.js new file mode 100644 index 00000000..80624f16 --- /dev/null +++ b/src/js/select2/i18n/zh-TW.js @@ -0,0 +1,33 @@ +define(function () { + // Chinese (Traditional) + return { + inputTooLong: function (args) { + var overChars = args.input.length - args.maximum; + + var message = '請刪掉' + overChars + '個字元'; + + return message; + }, + inputTooShort: function (args) { + var remainingChars = args.minimum - args.input.length; + + var message = '請再輸入' + remainingChars + '個字元'; + + return message; + }, + loadingMore: function () { + return '載入中…'; + }, + maximumSelected: function (args) { + var message = '你只能選擇最多' + args.maximum + '項'; + + return message; + }, + noResults: function () { + return '沒有找到相符的項目'; + }, + searching: function () { + return '搜尋中…'; + } + }; +});