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

Separate language files #336

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jQuery Date Range Picker is a jQuery plugin that allows user to select a date ra
* Written by Chunlong ( jszen.com )
* I accept further customization job if you require more functions. Please contact me via [email protected]

##[Documentation & Demo](http://longbill.github.io/jquery-date-range-picker/)
## [Documentation & Demo](http://longbill.github.io/jquery-date-range-picker/)

![screenshot](https://raw.github.com/longbill/jquery-date-range-picker/master/preview.jpg)

Expand Down
2 changes: 1 addition & 1 deletion dist/daterangepicker.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions dist/jquery.daterangepicker.min.js

Large diffs are not rendered by default.

15 changes: 11 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
gutil = require("gulp-util"),
del = require('del'),
beautify = require("gulp-jsbeautifier"),
jsonmin = require("gulp-jsonmin"),
uglify = require("gulp-uglify"),
minifyCSS = require("gulp-minify-css"),
rename = require("gulp-rename"),
Expand Down Expand Up @@ -34,20 +35,26 @@
.pipe(minifyCSS())
.pipe(rename('daterangepicker.min.css'))
.pipe(gulp.dest('./dist'))
.on('error', gutil.log)
.on('error', gutil.log);
});

gulp.task('dist:script', ['dist:clean'], function () {
gulp.task('dist:scripts', ['dist:clean'], function () {
return gulp.src('./src/*.js')
.pipe(uglify())
.pipe(rename('jquery.daterangepicker.min.js'))
.pipe(header(banner, {pkg: pkg}))
.pipe(gulp.dest('./dist'))
.on('error', gutil.log)
.on('error', gutil.log);
});

gulp.task('dist:locales', ['dist:clean'], function () {
return gulp.src('./locales/*.json')
.pipe(jsonmin())
.pipe(gulp.dest('./dist'))
.on('error', gutil.log);
});

gulp.task('default', ['dist:clean', 'dist:styles', 'dist:script'], function (cb) {
gulp.task('default', ['dist:clean', 'dist:styles', 'dist:scripts', 'dist:locales'], function (cb) {
gutil.log('Info :', gutil.colors.green('Distribution files are ready!'));
cb(null)
});
Expand Down
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>jQuery Date Range Picker Demo</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" />
<link rel="stylesheet" href="dist/daterangepicker.min.css" />
<link rel="stylesheet" href="src/daterangepicker.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.16.0/moment.min.js" type="text/javascript"></script>
<script src="dist/jquery.daterangepicker.min.js"></script>
<script src="src/jquery.daterangepicker.js"></script>
<script src="demo.js"></script>
<style type="text/css">
#wrapper
Expand Down Expand Up @@ -134,7 +134,7 @@ <h2 id="demonstrations">Demonstrations</h2>
</div>

<div class="demo">
Use custom language: <input id="date-range4-1" size="40" value="">
Default language is used when using partially translated / custom language: <input id="date-range4-1" size="40" value="">
<a href="#" class="show-option">Show Config</a>
<pre class="options">
{
Expand Down
45 changes: 45 additions & 0 deletions locales/az.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"selected": "Seçildi:",
"day": " gün",
"days": " gün",
"apply": "tətbiq",
"week-1": "1",
"week-2": "2",
"week-3": "3",
"week-4": "4",
"week-5": "5",
"week-6": "6",
"week-7": "7",
"month-name": [
"yanvar",
"fevral",
"mart",
"aprel",
"may",
"iyun",
"iyul",
"avqust",
"sentyabr",
"oktyabr",
"noyabr",
"dekabr"
],
"shortcuts": "Qısayollar",
"past": "Keçmiş",
"following": "Növbəti",
"previous": "&nbsp;&nbsp;&nbsp;",
"prev-week": "Öncəki həftə",
"prev-month": "Öncəki ay",
"prev-year": "Öncəki il",
"next": "&nbsp;&nbsp;&nbsp;",
"next-week": "Növbəti həftə",
"next-month": "Növbəti ay",
"next-year": "Növbəti il",
"less-than": "Tarix aralığı %d gündən çox olmamalıdır",
"more-than": "Tarix aralığı %d gündən az olmamalıdır",
"default-more": "%d gündən çox bir tarix seçin",
"default-single": "Tarix seçin",
"default-less": "%d gündən az bir tarix seçin",
"default-range": "%d və %d gün aralığında tarixlər seçin",
"default-default": "Tarix aralığı seçin"
}
50 changes: 50 additions & 0 deletions locales/bg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"selected": "Избрано:",
"day": "Ден",
"days": "Дни",
"apply": "Затвори",
"week-1": "пн",
"week-2": "вт",
"week-3": "ср",
"week-4": "чт",
"week-5": "пт",
"week-6": "сб",
"week-7": "нд",
"week-number": "С",
"month-name": [
"януари",
"февруари",
"март",
"април",
"май",
"юни",
"юли",
"август",
"септември",
"октомври",
"ноември",
"декември"
],
"shortcuts": "Преки пътища",
"custom-values": "Персонализирани стойности",
"past": "Минал",
"following": "Следващ",
"previous": "Предишен",
"prev-week": "Седмица",
"prev-month": "Месец",
"prev-year": "Година",
"next": "Следващ",
"next-week": "Седмица",
"next-month": "Месец",
"next-year": "Година",
"less-than": "Периодът от време не трябва да е повече от %d дни",
"more-than": "Периодът от време не трябва да е по-малко от %d дни",
"default-more": "Моля изберете период по-дълъг от %d дни",
"default-single": "Моля изберете дата",
"default-less": "Моля изберете период по-къс от %d дни",
"default-range": "Моля изберете период между %d и %d дни",
"default-default": "Моля изберете период",
"time": "Време",
"hour": "Час",
"minute": "Минута"
}
Loading