ソースを参照

update soft refs to lang in automated tests

Adam Shaw 9 年 前
コミット
6491ef64cc

+ 3 - 3
tests/automated/allDayText.js

@@ -53,9 +53,9 @@ describe('allDayText', function() {
 		});
 	});
 
-	describe('when allDaySlots is set true and language is not default', function() {
+	describe('when allDaySlots is set true and locale is not default', function() {
 		describe('in agendaWeek', function() {
-			it('should use the language\'s all-day value', function() {
+			it('should use the locale\'s all-day value', function() {
 				var options = {
 					defaultView: 'agendaWeek',
 					allDaySlot: true,
@@ -67,7 +67,7 @@ describe('allDayText', function() {
 			});
 		});
 		describe('in agendaDay', function() {
-			it('should use the language\'s all-day value', function() {
+			it('should use the locale\'s all-day value', function() {
 				var options = {
 					defaultView: 'agendaDay',
 					allDaySlot: true,

+ 1 - 1
tests/automated/axisFormat.js

@@ -19,7 +19,7 @@ describe('axisFormat', function() {
 		expect(getAxisText()).toBe('12am');
 	});
 
-	it('renders correctly when default and the language is customized', function() {
+	it('renders correctly when default and the locale is customized', function() {
 		options.locale = 'en-gb';
 		$('#cal').fullCalendar(options);
 		expect(getAxisText()).toBe('00');

+ 4 - 4
tests/automated/buttonText.js

@@ -13,7 +13,7 @@ describe('button text', function() {
     };
   });
 
-  describe('with default language', function() {
+  describe('with default locale', function() {
 
     describe('with default buttonIcons', function() {
 
@@ -115,7 +115,7 @@ describe('button text', function() {
 
   });
 
-  describe('when lang is not default', function() {
+  describe('when locale is not default', function() {
 
     beforeEach(function() {
       settings.locale = 'fr';
@@ -177,10 +177,10 @@ describe('button text', function() {
       it('should contain default text values', function() {
         $('#cal').fullCalendar(settings);
 
-        // will have the language's actual text now
+        // will have the locale's actual text now
         expect($('.fc-next-button')).toHaveText('Suivant');
         expect($('.fc-prev-button')).toHaveText('Précédent');
-        //// languages files don't have data for prev/next *year*
+        //// locales files don't have data for prev/next *year*
         //expect($('.fc-nextYear-button')).toHaveText('Suivant');
         //expect($('.fc-prevYear-button')).toHaveText('Précédent');
 

+ 3 - 3
tests/automated/columnFormat.js

@@ -61,7 +61,7 @@ describe('columnFormat', function() {
         });
     });
 
-    describe('when lang is French', function() {
+    describe('when locale is French', function() {
 
         var viewWithFormat = [ { view: 'month', expected: 'dim.', selector: 'th.fc-day-header.fc-sun' },
             { view: 'basicWeek', expected: 'dim. 11/5', selector: 'th.fc-day-header.fc-sun' },
@@ -87,7 +87,7 @@ describe('columnFormat', function() {
         });
     });
 
-    describe('when lang is en-gb', function() {
+    describe('when locale is en-gb', function() {
 
         var viewWithFormat = [ { view: 'month', expected: 'Sun', selector: 'th.fc-day-header.fc-sun' },
             { view: 'basicWeek', expected: 'Sun 11/5', selector: 'th.fc-day-header.fc-sun' },
@@ -113,7 +113,7 @@ describe('columnFormat', function() {
         });
     });
 
-    describe('when lang is Korean', function() {
+    describe('when locale is Korean', function() {
 
         var viewWithFormat = [ { view: 'month', expected: '일', selector: 'th.fc-day-header.fc-sun' },
             { view: 'basicWeek', expected: '일 5.11', selector: 'th.fc-day-header.fc-sun' },

+ 3 - 3
tests/automated/custom-view-duration.js

@@ -240,7 +240,7 @@ describe('custom view', function() {
 			expect($('.fc-custom-button')).toHaveText('awesome');
 		});
 
-		it('accepts lang\'s single-unit-match override', function() {
+		it('accepts locale\'s single-unit-match override', function() {
 			options.locale = 'fr';
 			options.views.custom = {
 				type: 'basic',
@@ -254,7 +254,7 @@ describe('custom view', function() {
 			expect($('.fc-custom-button')).toHaveText('Jour');
 		});
 
-		it('accepts explicit View-Specific buttonText, overriding lang\'s single-unit-match override', function() {
+		it('accepts explicit View-Specific buttonText, overriding locale\'s single-unit-match override', function() {
 			options.locale = 'fr';
 			options.views.custom = {
 				type: 'basic',
@@ -310,7 +310,7 @@ describe('custom view', function() {
 			expect($('.fc-custom-button')).toHaveText('4 days');
 		});
 
-		it('falls back to humanized duration and respects language', function() {
+		it('falls back to humanized duration and respects locale', function() {
 			options.locale = 'fr';
 			options.views.custom = {
 				type: 'basic',

+ 7 - 7
tests/automated/dayNames.js

@@ -14,7 +14,7 @@ describe('day names', function() {
     '.fc-sat'
   ];
   var referenceDate = '2014-05-25 06:00'; // A sunday
-  var languages = [ 'es', 'fr', 'de', 'zh-cn', 'nl' ];
+  var locales = [ 'es', 'fr', 'de', 'zh-cn', 'nl' ];
 
   beforeEach(function() {
     affix('#cal');
@@ -24,7 +24,7 @@ describe('day names', function() {
   });
 
   afterEach(function() {
-    moment.locale('en'); // reset moment's global language
+    moment.locale('en'); // reset moment's global locale
   });
 
   testableClasses.forEach(function(viewClass, index, viewClasses) {
@@ -33,7 +33,7 @@ describe('day names', function() {
         settings.defaultView = 'basicDay';
       });
 
-      describe('when lang is default', function() {
+      describe('when locale is default', function() {
         beforeEach(function() {
           settings.locale = 'en';
         });
@@ -49,15 +49,15 @@ describe('day names', function() {
         });
       });
 
-      $.each(languages, function(index, language) {
-        describe('when lang is ' + language, function() {
+      $.each(locales, function(index, locale) {
+        describe('when locale is ' + locale, function() {
           beforeEach(function() {
-            moment.locale(language);
+            moment.locale(locale);
           });
 
           dayClasses.forEach(function(cls, index, classes) {
             it('should be the translation for ' + moment.weekdays()[index], function() {
-              settings.locale = language;
+              settings.locale = locale;
               settings.now = moment(referenceDate).add(index, 'days');
               $('#cal').fullCalendar(settings);
 

+ 9 - 9
tests/automated/dayNamesShort.js

@@ -14,7 +14,7 @@ describe('short day names', function() {
     '.fc-fri',
     '.fc-sat'
   ];
-  var languages = [ 'es', 'fr', 'de', 'zh-cn', 'es' ];
+  var locales = [ 'es', 'fr', 'de', 'zh-cn', 'es' ];
 
   beforeEach(function() {
     affix('#cal');
@@ -22,7 +22,7 @@ describe('short day names', function() {
   });
 
   afterEach(function() {
-    moment.locale('en'); // reset moment's global language
+    moment.locale('en'); // reset moment's global locale
   });
 
   testableClasses.forEach(function(viewClass, index, viewClasses) {
@@ -31,7 +31,7 @@ describe('short day names', function() {
         settings.defaultView = viewClass;
       });
 
-      describe('when lang is default', function() {
+      describe('when locale is default', function() {
         it('should be in English', function() {
           moment.locale('en');
           $('#cal').fullCalendar(settings);
@@ -43,14 +43,14 @@ describe('short day names', function() {
         });
       });
 
-      describe('when lang is not default', function() {
-        languages.forEach(function(language, index, languages) {
-          it('should be in the selected language', function() {
-            settings.locale = language;
+      describe('when locale is not default', function() {
+        locales.forEach(function(locale, index, locales) {
+          it('should be in the selected locale', function() {
+            settings.locale = locale;
             $('#cal').fullCalendar(settings);
 
-            moment.locale(language);
-            var dow = moment.localeData(language)._week.dow;
+            moment.locale(locale);
+            var dow = moment.localeData(locale)._week.dow;
             var weekdays = moment.weekdaysShort();
 
             dayClasses.forEach(function(cls, index, classes) {

+ 1 - 1
tests/automated/dayPopoverFormat.js

@@ -34,7 +34,7 @@ describe('dayPopoverFormat', function() {
 		expect($('.fc-more-popover > .fc-header .fc-title')).toHaveText('29 juillet 2014');
 	});
 
-	it('still maintains the same format when explicitly set, and there is a lang', function() {
+	it('still maintains the same format when explicitly set, and there is a locale', function() {
 		options.locale = 'fr';
 		options.dayPopoverFormat = 'YYYY';
 		init();

+ 1 - 1
tests/automated/firstDay.js

@@ -183,7 +183,7 @@ describe('First Day', function() {
 		});
 	});
 
-	it('should have a different default value based on the language', function() {
+	it('should have a different default value based on the locale', function() {
 		$('#cal').fullCalendar({
 			locale: 'en-gb'
 		});

+ 2 - 2
tests/automated/formatRange.js

@@ -122,9 +122,9 @@ describe('formatRange', function() {
 
 	});
 
-	describe('when calendar has a customized lang', function() {
+	describe('when calendar has a customized locale', function() {
 
-		it('uses language and splits correctly on day when dates have same month', function() {
+		it('uses locale and splits correctly on day when dates have same month', function() {
 			affix('#cal');
 			$('#cal').fullCalendar({
 				defaultView: 'basicWeek',

+ 1 - 1
tests/automated/isRTL.js

@@ -1,6 +1,6 @@
 describe('isRTL', function() {
 
-	it('has it\'s default value computed differently based off of the language', function() {
+	it('has it\'s default value computed differently based off of the locale', function() {
 		affix('#cal');
 		$('#cal').fullCalendar({
 			locale: 'ar' // Arabic is RTL

+ 6 - 6
tests/automated/lang.js

@@ -1,11 +1,11 @@
 
-describe('lang', function() {
+describe('locale', function() {
 
 	afterEach(function() {
 		moment.locale('en');
 	});
 
-	it('is not affected by global moment lang when unset', function() {
+	it('is not affected by global moment locale when unset', function() {
 		moment.locale('fr');
 		affix('#cal');
 		$('#cal').fullCalendar();
@@ -15,7 +15,7 @@ describe('lang', function() {
 		expect(s).toEqual('Thursday May 1st 2014');
 	});
 
-	it('is not affected by global moment lang when unset', function() {
+	it('is not affected by global moment locale when unset', function() {
 		moment.locale('fr');
 		affix('#cal');
 		$('#cal').fullCalendar({
@@ -27,7 +27,7 @@ describe('lang', function() {
 		expect(s).toEqual('jueves mayo 1º 2014');
 	});
 
-	it('doesn\'t side-effect the global moment lang when customized', function() {
+	it('doesn\'t side-effect the global moment locale when customized', function() {
 		moment.locale('fr');
 		affix('#cal');
 		$('#cal').fullCalendar({
@@ -43,7 +43,7 @@ describe('lang', function() {
 	// and instead of papering over this, just let it be thrown. will indicate that something
 	// needs to be fixed to the developer.
 	/*
-	xit('defaults to English when configured to language that isn\'t loaded', function() {
+	xit('defaults to English when configured to locale that isn\'t loaded', function() {
 		affix('#cal');
 		$('#cal').fullCalendar({
 			locale: 'zz'
@@ -55,7 +55,7 @@ describe('lang', function() {
 	});
 	*/
 
-	it('works when certain language has no FC settings defined', function() {
+	it('works when certain locale has no FC settings defined', function() {
 		affix('#cal');
 		$('#cal').fullCalendar({
 			locale: 'en-ca',

+ 10 - 10
tests/automated/monthNames.js

@@ -1,7 +1,7 @@
 describe('month name', function() {
   var settings = {};
   var referenceDate = '2014-01-01'; // The day the world is hung-over
-  var languages = [ 'es', 'fr', 'de', 'zh-cn', 'nl' ];
+  var locales = [ 'es', 'fr', 'de', 'zh-cn', 'nl' ];
 
   beforeEach(function() {
     affix('#cal');
@@ -11,7 +11,7 @@ describe('month name', function() {
   });
 
   afterEach(function() {
-    moment.locale('en'); // reset moment's global language
+    moment.locale('en'); // reset moment's global locale
   });
 
   [ 'month', 'agendaDay', 'basicDay' ].forEach(function(viewClass, index, viewClasses) {
@@ -20,7 +20,7 @@ describe('month name', function() {
         settings.defaultView = viewClass;
       });
 
-      describe('when lang is default', function() {
+      describe('when locale is default', function() {
         beforeEach(function() {
           settings.locale = 'en';
           moment.locale('en');
@@ -39,22 +39,22 @@ describe('month name', function() {
         });
       });
 
-      languages.forEach(function(language, index, languages) {
-        describe('when lang is ' + language, function() {
+      locales.forEach(function(locale, index, locales) {
+        describe('when locale is ' + locale, function() {
           beforeEach(function() {
-            settings.locale = language;
-            moment.locale(language);
+            settings.locale = locale;
+            moment.locale(locale);
           });
 
           moment.months().forEach(function(month, index, months) { // `month` will always be English
             it('should be the translated name for ' + month, function(done) {
-              var langMonths = moment.months();
-              var langMonth = langMonths[index];
+              var localeMonths = moment.months();
+              var localeMonth = localeMonths[index];
 
               settings.defaultDate = $.fullCalendar.moment(referenceDate).add(index, 'months');
               settings.eventAfterAllRender = function() {
                 if (viewClass == 'month') { // with month view check for occurence of the monthname in the title
-                  expect($('.fc-toolbar h2')).toContainText(langMonth);
+                  expect($('.fc-toolbar h2')).toContainText(localeMonth);
                 }
                 else { // with day views ensure that title contains the properly formatted phrase
                   expect($('.fc-toolbar h2')).toHaveText(settings.defaultDate.format('LL'));

+ 10 - 10
tests/automated/monthNamesShort.js

@@ -1,7 +1,7 @@
 describe('short month name', function() {
   var settings = {};
   var referenceDate = '2014-01-01'; // The day the world is hung-over
-  var languages = [ 'es', 'fr', 'de', 'zh-cn', 'nl' ];
+  var locales = [ 'es', 'fr', 'de', 'zh-cn', 'nl' ];
 
   beforeEach(function() {
     affix('#cal');
@@ -11,7 +11,7 @@ describe('short month name', function() {
   });
 
   afterEach(function() {
-    moment.locale('en'); // reset moment's global language
+    moment.locale('en'); // reset moment's global locale
   });
 
   [ 'agendaWeek', 'basicWeek' ].forEach(function(viewClass, index, viewClasses) {
@@ -20,7 +20,7 @@ describe('short month name', function() {
         settings.defaultView = viewClass;
       });
 
-      describe('when lang is default', function() {
+      describe('when locale is default', function() {
         beforeEach(function() {
           settings.locale = 'en';
           moment.locale('en');
@@ -39,21 +39,21 @@ describe('short month name', function() {
         });
       });
 
-      languages.forEach(function(language, index, languages) {
-        describe('when lang is ' + language, function() {
+      locales.forEach(function(locale, index, locales) {
+        describe('when locale is ' + locale, function() {
           beforeEach(function() {
-            settings.locale = language;
-            moment.locale(language);
+            settings.locale = locale;
+            moment.locale(locale);
           });
 
           moment.monthsShort().forEach(function(monthShort, index) { // `monthShort` will always be English
             it('should be the translated name for ' + monthShort, function(done) {
-              var langMonthsShort = moment.monthsShort();
-              var langMonthShort = langMonthsShort[index];
+              var localeMonthsShort = moment.monthsShort();
+              var localeMonthShort = localeMonthsShort[index];
 
               settings.defaultDate = $.fullCalendar.moment(referenceDate).add(index, 'months');
               settings.eventAfterAllRender = function() {
-                expect($('.fc-toolbar h2')).toContainText(langMonthShort);
+                expect($('.fc-toolbar h2')).toContainText(localeMonthShort);
                 done();
               };
 

+ 2 - 2
tests/automated/timeFormat.js

@@ -29,7 +29,7 @@ describe('timeFormat', function() {
 			expect(getRenderedEventTime()).toBe('3p');
 		});
 
-		it('renders correctly when default and the language is customized', function() {
+		it('renders correctly when default and the locale is customized', function() {
 			options.locale = 'en-gb';
 			$('#cal').fullCalendar(options);
 			expect(getRenderedEventTime()).toBe('15');
@@ -53,7 +53,7 @@ describe('timeFormat', function() {
 			expect(getRenderedEventTime()).toBe('3:00 - 5:00');
 		});
 
-		it('renders correctly when default and the language is customized', function() {
+		it('renders correctly when default and the locale is customized', function() {
 			options.locale = 'en-gb';
 			$('#cal').fullCalendar(options);
 			expect(getRenderedEventTime()).toBe('15:00 - 17:00');

+ 1 - 1
tests/automated/titleFormat.js

@@ -69,7 +69,7 @@ describe('titleFormat', function() {
         });
     });
 
-    describe('when default and language is French', function() {
+    describe('when default and locale is French', function() {
 
         var viewWithFormat = [
             { view: 'month', expected: 'juin 2014' },

+ 1 - 1
tests/automated/weekNumberCalculation.js

@@ -37,7 +37,7 @@ describe('weekNumberCalculation', function() {
 				expect(getRenderedWeekNumber()).toBe(47);
 			});
 
-			it('should display a language-specific local week number', function() {
+			it('should display a locale-specific local week number', function() {
 				options.defaultDate = '2013-11-23'; // a Saturday
 				options.locale = 'ar';
 				options.weekNumberCalculation = 'local';

+ 1 - 1
tests/automated/weekNumberTitle.js

@@ -27,7 +27,7 @@ describe('weekNumberTitle', function() {
 				expect(getRenderedWeekNumberTitle()).toBe('W');
 			});
 
-			it('renders correctly when unspecified and when language is customized', function() {
+			it('renders correctly when unspecified and when locale is customized', function() {
 				options.locale = 'es';
 				$('#cal').fullCalendar(options);
 				expect(getRenderedWeekNumberTitle()).toBe('Sm');