[gnome-shell] calendar: Allow translators to change non-work days
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] calendar: Allow translators to change non-work days
- Date: Fri, 7 Nov 2014 17:21:57 +0000 (UTC)
commit 21d11b3638572fa3db7dbc57d64670e6f2971c15
Author: Lavi .A <laviams gmail com>
Date: Wed Nov 23 16:48:00 2011 +0000
calendar: Allow translators to change non-work days
https://bugzilla.gnome.org/show_bug.cgi?id=664645
js/ui/calendar.js | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/calendar.js b/js/ui/calendar.js
index e639ef7..127eb2d 100644
--- a/js/ui/calendar.js
+++ b/js/ui/calendar.js
@@ -34,12 +34,10 @@ function _sameDay(dateA, dateB) {
return _sameMonth(dateA, dateB) && (dateA.getDate() == dateB.getDate());
}
-/* TODO: maybe needs config - right now we assume that Saturday and
- * Sunday are non-work days (not true in e.g. Israel, it's Sunday and
- * Monday there)
- */
function _isWorkDay(date) {
- return date.getDay() != 0 && date.getDay() != 6;
+ /* Translators: Enter 0-6 (Sunday-Saturday) for non-work days. Examples: "0" (Sunday) "6" (Saturday)
"06" (Sunday and Saturday). */
+ let days = C_('calendar-no-work', "06");
+ return days.indexOf(date.getDay().toString()) == -1;
}
function _getBeginningOfDay(date) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]