From 5330a0cc62b8536a012f579e5c417381a1af371f Mon Sep 17 00:00:00 2001 From: Muhammad Nasir Rahimi Date: Sat, 17 Jun 2017 13:29:44 +0430 Subject: [PATCH 1/4] Add Pashto (ps) Language --- dist/js/i18n/ps.js | 3 +++ src/js/select2/i18n/ps.js | 44 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 dist/js/i18n/ps.js create mode 100644 src/js/select2/i18n/ps.js diff --git a/dist/js/i18n/ps.js b/dist/js/i18n/ps.js new file mode 100644 index 00000000..ee9f26d7 --- /dev/null +++ b/dist/js/i18n/ps.js @@ -0,0 +1,3 @@ +/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ + +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ps",[],function(){return{errorLoading:function(){return"پايلي نه سي ترلاسه کېدای"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="د مهربانۍ لمخي "+t+" توری لږ کړئ";return t!=1&&(n=n.replace("توری","توري")),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 e.maximum!=1&&(t=t.replace("قلم","قلمونه")),t},noResults:function(){return"پايلي و نه موندل سوې"},searching:function(){return"لټول کيږي..."}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/src/js/select2/i18n/ps.js b/src/js/select2/i18n/ps.js new file mode 100644 index 00000000..4d903e11 --- /dev/null +++ b/src/js/select2/i18n/ps.js @@ -0,0 +1,44 @@ +define(function () { + // Pashto (پښتو) + return { + errorLoading: function () { + return 'پايلي نه سي ترلاسه کېدای'; + }, + inputTooLong: function (args) { + var overChars = args.input.length - args.maximum; + + var message = 'د مهربانۍ لمخي ' + overChars + ' توری لږ کړئ'; + + if (overChars != 1) { + message = message.replace('توری', 'توري'); + } + + 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 + ' قلم په نښه کولای سی'; + + if (args.maximum != 1) { + message = message.replace('قلم', 'قلمونه'); + } + + return message; + }, + noResults: function () { + return 'پايلي و نه موندل سوې'; + }, + searching: function () { + return 'لټول کيږي...'; + } + }; +}); From dbb1132b7ecad21f68eb95566ecd4d2880665e02 Mon Sep 17 00:00:00 2001 From: Muhammad Nasir Rahimi Date: Sat, 17 Jun 2017 13:44:22 +0430 Subject: [PATCH 2/4] JSHint maxlen fix --- src/js/select2/i18n/ps.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/js/select2/i18n/ps.js b/src/js/select2/i18n/ps.js index 4d903e11..6db1e2eb 100644 --- a/src/js/select2/i18n/ps.js +++ b/src/js/select2/i18n/ps.js @@ -1,3 +1,4 @@ +/* jslint maxlen: 87 */ define(function () { // Pashto (پښتو) return { From 1b2d0424e95f1582e0fe7a94cfe78b2c31de0b83 Mon Sep 17 00:00:00 2001 From: Muhammad Nasir Rahimi Date: Sun, 18 Jun 2017 10:50:10 +0430 Subject: [PATCH 3/4] Translation improved --- dist/js/i18n/ps.js | 2 +- src/js/select2/i18n/ps.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/js/i18n/ps.js b/dist/js/i18n/ps.js index ee9f26d7..51b746ec 100644 --- a/dist/js/i18n/ps.js +++ b/dist/js/i18n/ps.js @@ -1,3 +1,3 @@ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ -(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ps",[],function(){return{errorLoading:function(){return"پايلي نه سي ترلاسه کېدای"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="د مهربانۍ لمخي "+t+" توری لږ کړئ";return t!=1&&(n=n.replace("توری","توري")),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 e.maximum!=1&&(t=t.replace("قلم","قلمونه")),t},noResults:function(){return"پايلي و نه موندل سوې"},searching:function(){return"لټول کيږي..."}}}),{define:e.define,require:e.require}})(); \ No newline at end of file +(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ps",[],function(){return{errorLoading:function(){return"پايلي نه سي ترلاسه کېدای"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="د مهربانۍ لمخي "+t+" توری ړنګ کړئ";return t!=1&&(n=n.replace("توری","توري")),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 e.maximum!=1&&(t=t.replace("قلم","قلمونه")),t},noResults:function(){return"پايلي و نه موندل سوې"},searching:function(){return"لټول کيږي..."}}}),{define:e.define,require:e.require}})(); \ No newline at end of file diff --git a/src/js/select2/i18n/ps.js b/src/js/select2/i18n/ps.js index 6db1e2eb..9c70af93 100644 --- a/src/js/select2/i18n/ps.js +++ b/src/js/select2/i18n/ps.js @@ -8,7 +8,7 @@ define(function () { inputTooLong: function (args) { var overChars = args.input.length - args.maximum; - var message = 'د مهربانۍ لمخي ' + overChars + ' توری لږ کړئ'; + var message = 'د مهربانۍ لمخي ' + overChars + ' توری ړنګ کړئ'; if (overChars != 1) { message = message.replace('توری', 'توري'); @@ -19,7 +19,7 @@ define(function () { inputTooShort: function (args) { var remainingChars = args.minimum - args.input.length; - var message = 'د مهربانۍ لمخي ' + remainingChars + ' يا ډېر توري زيات کړئ'; + var message = 'لږ تر لږه ' + remainingChars + ' يا ډېر توري وليکئ'; return message; }, From 23b3896bcff65c6b8ff77089b1f1754e8f83b957 Mon Sep 17 00:00:00 2001 From: Muhammad Nasir Rahimi Date: Wed, 27 Sep 2017 22:57:22 +0430 Subject: [PATCH 4/4] ps.js file removed from dist/ --- dist/js/i18n/ps.js | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 dist/js/i18n/ps.js diff --git a/dist/js/i18n/ps.js b/dist/js/i18n/ps.js deleted file mode 100644 index 51b746ec..00000000 --- a/dist/js/i18n/ps.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */ - -(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ps",[],function(){return{errorLoading:function(){return"پايلي نه سي ترلاسه کېدای"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="د مهربانۍ لمخي "+t+" توری ړنګ کړئ";return t!=1&&(n=n.replace("توری","توري")),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 e.maximum!=1&&(t=t.replace("قلم","قلمونه")),t},noResults:function(){return"پايلي و نه موندل سوې"},searching:function(){return"لټول کيږي..."}}}),{define:e.define,require:e.require}})(); \ No newline at end of file