Browse Source

Add WeekdayCondition and TimeCondition to omega-web. Fix #513.

FelisCatus 9 years ago
parent
commit
5090ebf323

+ 45 - 0
omega-locales/ach/LC_MESSAGES/omega-web.po

@@ -115,6 +115,27 @@ msgstr ""
 "the previous information (like patterns) and can be re-enabled by setting "
 "the condition type back to the previous type."
 
+msgid "condition_TimeCondition"
+msgstr "Current Time"
+
+msgid "condition_help_TimeCondition"
+msgstr ""
+"Matches if the current local time is in the range defined by "
+"<b>starting hour</b> and <b>ending hour</b>, both inclusive.<br>"
+"Local time, starting hour and ending hour are all calculated in "
+"<b>24-hour</b> format (from <b>0 to 23</b>). <br>"
+"The calculation happens roughly at the moment when the request is sent."
+
+msgid "condition_WeekdayCondition"
+msgstr "Day of the Week"
+
+msgid "condition_help_WeekdayCondition"
+msgstr ""
+"Matches if the <b>current day of week</b> is selected in condition details. "
+"Day is calculated according to local timezone.<br>"
+"The request and its URL don't matter to this condition. "
+"The result is solely based on the day of the week when the request is sent."
+
 msgid "condition_group_default"
 msgstr " "
 
@@ -646,6 +667,30 @@ msgstr "Default"
 msgid "options_hostLevelsBetween"
 msgstr "≤ host levels ≤"
 
+msgid "options_hourBetween"
+msgstr "≤ current hour ≤"
+
+msgid "options_weekDayShort_0"
+msgstr "Su"
+
+msgid "options_weekDayShort_1"
+msgstr "Mo"
+
+msgid "options_weekDayShort_2"
+msgstr "Tu"
+
+msgid "options_weekDayShort_3"
+msgstr "We"
+
+msgid "options_weekDayShort_4"
+msgstr "Th"
+
+msgid "options_weekDayShort_5"
+msgstr "Fr"
+
+msgid "options_weekDayShort_6"
+msgstr "Sa"
+
 msgid "options_group_conditionHelp"
 msgstr "About Condition Types"
 

+ 45 - 0
omega-locales/cs/LC_MESSAGES/omega-web.po

@@ -117,6 +117,27 @@ msgstr ""
 "informace (např modely) a lze znovu povolit nastavením podmínky typ zpět do "
 "předchozího typu."
 
+msgid "condition_TimeCondition"
+msgstr "Current Time"
+
+msgid "condition_help_TimeCondition"
+msgstr ""
+"Matches if the current local time is in the range defined by "
+"<b>starting hour</b> and <b>ending hour</b>, both inclusive.<br>"
+"Local time, starting hour and ending hour are all calculated in "
+"<b>24-hour</b> format (from <b>0 to 23</b>). <br>"
+"The calculation happens roughly at the moment when the request is sent."
+
+msgid "condition_WeekdayCondition"
+msgstr "Day of the Week"
+
+msgid "condition_help_WeekdayCondition"
+msgstr ""
+"Matches if the <b>current day of week</b> is selected in condition details. "
+"Day is calculated according to local timezone.<br>"
+"The request and its URL don't matter to this condition. "
+"The result is solely based on the day of the week when the request is sent."
+
 msgid "condition_group_default"
 msgstr " "
 
@@ -647,6 +668,30 @@ msgstr "Výchozí"
 msgid "options_hostLevelsBetween"
 msgstr "≤ host úrovně ≤"
 
+msgid "options_hourBetween"
+msgstr "≤ current hour ≤"
+
+msgid "options_weekDayShort_0"
+msgstr "Su"
+
+msgid "options_weekDayShort_1"
+msgstr "Mo"
+
+msgid "options_weekDayShort_2"
+msgstr "Tu"
+
+msgid "options_weekDayShort_3"
+msgstr "We"
+
+msgid "options_weekDayShort_4"
+msgstr "Th"
+
+msgid "options_weekDayShort_5"
+msgstr "Fr"
+
+msgid "options_weekDayShort_6"
+msgstr "Sa"
+
 msgid "options_group_conditionHelp"
 msgstr "O typech podmínek"
 

+ 45 - 0
omega-locales/de/LC_MESSAGES/omega-web.po

@@ -120,6 +120,27 @@ msgstr ""
 "the previous information (like patterns) and can be re-enabled by setting "
 "the condition type back to the previous type."
 
+msgid "condition_TimeCondition"
+msgstr "Current Time"
+
+msgid "condition_help_TimeCondition"
+msgstr ""
+"Matches if the current local time is in the range defined by "
+"<b>starting hour</b> and <b>ending hour</b>, both inclusive.<br>"
+"Local time, starting hour and ending hour are all calculated in "
+"<b>24-hour</b> format (from <b>0 to 23</b>). <br>"
+"The calculation happens roughly at the moment when the request is sent."
+
+msgid "condition_WeekdayCondition"
+msgstr "Day of the Week"
+
+msgid "condition_help_WeekdayCondition"
+msgstr ""
+"Matches if the <b>current day of week</b> is selected in condition details. "
+"Day is calculated according to local timezone.<br>"
+"The request and its URL don't matter to this condition. "
+"The result is solely based on the day of the week when the request is sent."
+
 msgid "condition_group_default"
 msgstr " "
 
@@ -651,6 +672,30 @@ msgstr "Default"
 msgid "options_hostLevelsBetween"
 msgstr "≤ host levels ≤"
 
+msgid "options_hourBetween"
+msgstr "≤ current hour ≤"
+
+msgid "options_weekDayShort_0"
+msgstr "Su"
+
+msgid "options_weekDayShort_1"
+msgstr "Mo"
+
+msgid "options_weekDayShort_2"
+msgstr "Tu"
+
+msgid "options_weekDayShort_3"
+msgstr "We"
+
+msgid "options_weekDayShort_4"
+msgstr "Th"
+
+msgid "options_weekDayShort_5"
+msgstr "Fr"
+
+msgid "options_weekDayShort_6"
+msgstr "Sa"
+
 msgid "options_group_conditionHelp"
 msgstr "About Condition Types"
 

+ 45 - 0
omega-locales/en_US/LC_MESSAGES/omega-web.po

@@ -116,6 +116,27 @@ msgstr ""
 "previous information (like patterns) and can be re-enabled by setting the "
 "condition type back to the previous type."
 
+msgid "condition_TimeCondition"
+msgstr "Current Time"
+
+msgid "condition_help_TimeCondition"
+msgstr ""
+"Matches if the current local time is in the range defined by "
+"<b>starting hour</b> and <b>ending hour</b>, both inclusive.<br>"
+"Local time, starting hour and ending hour are all calculated in "
+"<b>24-hour</b> format (from <b>0 to 23</b>). <br>"
+"The calculation happens roughly at the moment when the request is sent."
+
+msgid "condition_WeekdayCondition"
+msgstr "Day of the Week"
+
+msgid "condition_help_WeekdayCondition"
+msgstr ""
+"Matches if the <b>current day of week</b> is selected in condition details. "
+"Day is calculated according to local timezone.<br>"
+"The request and its URL don't matter to this condition. "
+"The result is solely based on the day of the week when the request is sent."
+
 msgid "condition_group_default"
 msgstr " "
 
@@ -638,6 +659,30 @@ msgstr "Default"
 msgid "options_hostLevelsBetween"
 msgstr "≤ host levels ≤"
 
+msgid "options_hourBetween"
+msgstr "≤ current hour ≤"
+
+msgid "options_weekDayShort_0"
+msgstr "Su"
+
+msgid "options_weekDayShort_1"
+msgstr "Mo"
+
+msgid "options_weekDayShort_2"
+msgstr "Tu"
+
+msgid "options_weekDayShort_3"
+msgstr "We"
+
+msgid "options_weekDayShort_4"
+msgstr "Th"
+
+msgid "options_weekDayShort_5"
+msgstr "Fr"
+
+msgid "options_weekDayShort_6"
+msgstr "Sa"
+
 msgid "options_group_conditionHelp"
 msgstr "About Condition Types"
 

+ 45 - 0
omega-locales/es_AR/LC_MESSAGES/omega-web.po

@@ -118,6 +118,27 @@ msgstr ""
 "the previous information (like patterns) and can be re-enabled by setting "
 "the condition type back to the previous type."
 
+msgid "condition_TimeCondition"
+msgstr "Current Time"
+
+msgid "condition_help_TimeCondition"
+msgstr ""
+"Matches if the current local time is in the range defined by "
+"<b>starting hour</b> and <b>ending hour</b>, both inclusive.<br>"
+"Local time, starting hour and ending hour are all calculated in "
+"<b>24-hour</b> format (from <b>0 to 23</b>). <br>"
+"The calculation happens roughly at the moment when the request is sent."
+
+msgid "condition_WeekdayCondition"
+msgstr "Day of the Week"
+
+msgid "condition_help_WeekdayCondition"
+msgstr ""
+"Matches if the <b>current day of week</b> is selected in condition details. "
+"Day is calculated according to local timezone.<br>"
+"The request and its URL don't matter to this condition. "
+"The result is solely based on the day of the week when the request is sent."
+
 msgid "condition_group_default"
 msgstr " "
 
@@ -649,6 +670,30 @@ msgstr "Default"
 msgid "options_hostLevelsBetween"
 msgstr "≤ host levels ≤"
 
+msgid "options_hourBetween"
+msgstr "≤ current hour ≤"
+
+msgid "options_weekDayShort_0"
+msgstr "Su"
+
+msgid "options_weekDayShort_1"
+msgstr "Mo"
+
+msgid "options_weekDayShort_2"
+msgstr "Tu"
+
+msgid "options_weekDayShort_3"
+msgstr "We"
+
+msgid "options_weekDayShort_4"
+msgstr "Th"
+
+msgid "options_weekDayShort_5"
+msgstr "Fr"
+
+msgid "options_weekDayShort_6"
+msgstr "Sa"
+
 msgid "options_group_conditionHelp"
 msgstr "About Condition Types"
 

+ 45 - 0
omega-locales/fa/LC_MESSAGES/omega-web.po

@@ -121,6 +121,27 @@ msgstr ""
 "تمامی تنظیمات خود را حفظ میکنند و در صورت نیاز میتوانید با برگردان نوع آن به "
 "حالت قبلی آن را فعال کنید ."
 
+msgid "condition_TimeCondition"
+msgstr "Current Time"
+
+msgid "condition_help_TimeCondition"
+msgstr ""
+"Matches if the current local time is in the range defined by "
+"<b>starting hour</b> and <b>ending hour</b>, both inclusive.<br>"
+"Local time, starting hour and ending hour are all calculated in "
+"<b>24-hour</b> format (from <b>0 to 23</b>). <br>"
+"The calculation happens roughly at the moment when the request is sent."
+
+msgid "condition_WeekdayCondition"
+msgstr "Day of the Week"
+
+msgid "condition_help_WeekdayCondition"
+msgstr ""
+"Matches if the <b>current day of week</b> is selected in condition details. "
+"Day is calculated according to local timezone.<br>"
+"The request and its URL don't matter to this condition. "
+"The result is solely based on the day of the week when the request is sent."
+
 msgid "condition_group_default"
 msgstr " "
 
@@ -653,6 +674,30 @@ msgstr "پیش فرض"
 msgid "options_hostLevelsBetween"
 msgstr "≤ سطوح میزبان ≤"
 
+msgid "options_hourBetween"
+msgstr "≤ current hour ≤"
+
+msgid "options_weekDayShort_0"
+msgstr "Su"
+
+msgid "options_weekDayShort_1"
+msgstr "Mo"
+
+msgid "options_weekDayShort_2"
+msgstr "Tu"
+
+msgid "options_weekDayShort_3"
+msgstr "We"
+
+msgid "options_weekDayShort_4"
+msgstr "Th"
+
+msgid "options_weekDayShort_5"
+msgstr "Fr"
+
+msgid "options_weekDayShort_6"
+msgstr "Sa"
+
 msgid "options_group_conditionHelp"
 msgstr "درباره ی انوع شروط"
 

+ 45 - 0
omega-locales/fr/LC_MESSAGES/omega-web.po

@@ -117,6 +117,27 @@ msgstr ""
 "the previous information (like patterns) and can be re-enabled by setting "
 "the condition type back to the previous type."
 
+msgid "condition_TimeCondition"
+msgstr "Current Time"
+
+msgid "condition_help_TimeCondition"
+msgstr ""
+"Matches if the current local time is in the range defined by "
+"<b>starting hour</b> and <b>ending hour</b>, both inclusive.<br>"
+"Local time, starting hour and ending hour are all calculated in "
+"<b>24-hour</b> format (from <b>0 to 23</b>). <br>"
+"The calculation happens roughly at the moment when the request is sent."
+
+msgid "condition_WeekdayCondition"
+msgstr "Day of the Week"
+
+msgid "condition_help_WeekdayCondition"
+msgstr ""
+"Matches if the <b>current day of week</b> is selected in condition details. "
+"Day is calculated according to local timezone.<br>"
+"The request and its URL don't matter to this condition. "
+"The result is solely based on the day of the week when the request is sent."
+
 msgid "condition_group_default"
 msgstr " "
 
@@ -648,6 +669,30 @@ msgstr "Default"
 msgid "options_hostLevelsBetween"
 msgstr "≤ host levels ≤"
 
+msgid "options_hourBetween"
+msgstr "≤ current hour ≤"
+
+msgid "options_weekDayShort_0"
+msgstr "Su"
+
+msgid "options_weekDayShort_1"
+msgstr "Mo"
+
+msgid "options_weekDayShort_2"
+msgstr "Tu"
+
+msgid "options_weekDayShort_3"
+msgstr "We"
+
+msgid "options_weekDayShort_4"
+msgstr "Th"
+
+msgid "options_weekDayShort_5"
+msgstr "Fr"
+
+msgid "options_weekDayShort_6"
+msgstr "Sa"
+
 msgid "options_group_conditionHelp"
 msgstr "About Condition Types"
 

+ 45 - 0
omega-locales/ja/LC_MESSAGES/omega-web.po

@@ -113,6 +113,27 @@ msgstr ""
 "the previous information (like patterns) and can be re-enabled by setting "
 "the condition type back to the previous type."
 
+msgid "condition_TimeCondition"
+msgstr "Current Time"
+
+msgid "condition_help_TimeCondition"
+msgstr ""
+"Matches if the current local time is in the range defined by "
+"<b>starting hour</b> and <b>ending hour</b>, both inclusive.<br>"
+"Local time, starting hour and ending hour are all calculated in "
+"<b>24-hour</b> format (from <b>0 to 23</b>). <br>"
+"The calculation happens roughly at the moment when the request is sent."
+
+msgid "condition_WeekdayCondition"
+msgstr "Day of the Week"
+
+msgid "condition_help_WeekdayCondition"
+msgstr ""
+"Matches if the <b>current day of week</b> is selected in condition details. "
+"Day is calculated according to local timezone.<br>"
+"The request and its URL don't matter to this condition. "
+"The result is solely based on the day of the week when the request is sent."
+
 msgid "condition_group_default"
 msgstr " "
 
@@ -642,6 +663,30 @@ msgstr "Default"
 msgid "options_hostLevelsBetween"
 msgstr "≤ host levels ≤"
 
+msgid "options_hourBetween"
+msgstr "≤ current hour ≤"
+
+msgid "options_weekDayShort_0"
+msgstr "Su"
+
+msgid "options_weekDayShort_1"
+msgstr "Mo"
+
+msgid "options_weekDayShort_2"
+msgstr "Tu"
+
+msgid "options_weekDayShort_3"
+msgstr "We"
+
+msgid "options_weekDayShort_4"
+msgstr "Th"
+
+msgid "options_weekDayShort_5"
+msgstr "Fr"
+
+msgid "options_weekDayShort_6"
+msgstr "Sa"
+
 msgid "options_group_conditionHelp"
 msgstr "About Condition Types"
 

+ 45 - 0
omega-locales/pt_BR/LC_MESSAGES/omega-web.po

@@ -116,6 +116,27 @@ msgstr ""
 "the previous information (like patterns) and can be re-enabled by setting "
 "the condition type back to the previous type."
 
+msgid "condition_TimeCondition"
+msgstr "Current Time"
+
+msgid "condition_help_TimeCondition"
+msgstr ""
+"Matches if the current local time is in the range defined by "
+"<b>starting hour</b> and <b>ending hour</b>, both inclusive.<br>"
+"Local time, starting hour and ending hour are all calculated in "
+"<b>24-hour</b> format (from <b>0 to 23</b>). <br>"
+"The calculation happens roughly at the moment when the request is sent."
+
+msgid "condition_WeekdayCondition"
+msgstr "Day of the Week"
+
+msgid "condition_help_WeekdayCondition"
+msgstr ""
+"Matches if the <b>current day of week</b> is selected in condition details. "
+"Day is calculated according to local timezone.<br>"
+"The request and its URL don't matter to this condition. "
+"The result is solely based on the day of the week when the request is sent."
+
 msgid "condition_group_default"
 msgstr " "
 
@@ -647,6 +668,30 @@ msgstr "Default"
 msgid "options_hostLevelsBetween"
 msgstr "≤ host levels ≤"
 
+msgid "options_hourBetween"
+msgstr "≤ current hour ≤"
+
+msgid "options_weekDayShort_0"
+msgstr "Su"
+
+msgid "options_weekDayShort_1"
+msgstr "Mo"
+
+msgid "options_weekDayShort_2"
+msgstr "Tu"
+
+msgid "options_weekDayShort_3"
+msgstr "We"
+
+msgid "options_weekDayShort_4"
+msgstr "Th"
+
+msgid "options_weekDayShort_5"
+msgstr "Fr"
+
+msgid "options_weekDayShort_6"
+msgstr "Sa"
+
 msgid "options_group_conditionHelp"
 msgstr "About Condition Types"
 

+ 45 - 0
omega-locales/ru/LC_MESSAGES/omega-web.po

@@ -120,6 +120,27 @@ msgstr ""
 "the previous information (like patterns) and can be re-enabled by setting "
 "the condition type back to the previous type."
 
+msgid "condition_TimeCondition"
+msgstr "Current Time"
+
+msgid "condition_help_TimeCondition"
+msgstr ""
+"Matches if the current local time is in the range defined by "
+"<b>starting hour</b> and <b>ending hour</b>, both inclusive.<br>"
+"Local time, starting hour and ending hour are all calculated in "
+"<b>24-hour</b> format (from <b>0 to 23</b>). <br>"
+"The calculation happens roughly at the moment when the request is sent."
+
+msgid "condition_WeekdayCondition"
+msgstr "Day of the Week"
+
+msgid "condition_help_WeekdayCondition"
+msgstr ""
+"Matches if the <b>current day of week</b> is selected in condition details. "
+"Day is calculated according to local timezone.<br>"
+"The request and its URL don't matter to this condition. "
+"The result is solely based on the day of the week when the request is sent."
+
 msgid "condition_group_default"
 msgstr " "
 
@@ -651,6 +672,30 @@ msgstr "Default"
 msgid "options_hostLevelsBetween"
 msgstr "≤ host levels ≤"
 
+msgid "options_hourBetween"
+msgstr "≤ current hour ≤"
+
+msgid "options_weekDayShort_0"
+msgstr "Su"
+
+msgid "options_weekDayShort_1"
+msgstr "Mo"
+
+msgid "options_weekDayShort_2"
+msgstr "Tu"
+
+msgid "options_weekDayShort_3"
+msgstr "We"
+
+msgid "options_weekDayShort_4"
+msgstr "Th"
+
+msgid "options_weekDayShort_5"
+msgstr "Fr"
+
+msgid "options_weekDayShort_6"
+msgstr "Sa"
+
 msgid "options_group_conditionHelp"
 msgstr "About Condition Types"
 

+ 45 - 0
omega-locales/tr/LC_MESSAGES/omega-web.po

@@ -119,6 +119,27 @@ msgstr ""
 "the previous information (like patterns) and can be re-enabled by setting "
 "the condition type back to the previous type."
 
+msgid "condition_TimeCondition"
+msgstr "Current Time"
+
+msgid "condition_help_TimeCondition"
+msgstr ""
+"Matches if the current local time is in the range defined by "
+"<b>starting hour</b> and <b>ending hour</b>, both inclusive.<br>"
+"Local time, starting hour and ending hour are all calculated in "
+"<b>24-hour</b> format (from <b>0 to 23</b>). <br>"
+"The calculation happens roughly at the moment when the request is sent."
+
+msgid "condition_WeekdayCondition"
+msgstr "Day of the Week"
+
+msgid "condition_help_WeekdayCondition"
+msgstr ""
+"Matches if the <b>current day of week</b> is selected in condition details. "
+"Day is calculated according to local timezone.<br>"
+"The request and its URL don't matter to this condition. "
+"The result is solely based on the day of the week when the request is sent."
+
 msgid "condition_group_default"
 msgstr ""
 
@@ -648,6 +669,30 @@ msgstr "Default"
 msgid "options_hostLevelsBetween"
 msgstr "≤ host levels ≤"
 
+msgid "options_hourBetween"
+msgstr "≤ current hour ≤"
+
+msgid "options_weekDayShort_0"
+msgstr "Su"
+
+msgid "options_weekDayShort_1"
+msgstr "Mo"
+
+msgid "options_weekDayShort_2"
+msgstr "Tu"
+
+msgid "options_weekDayShort_3"
+msgstr "We"
+
+msgid "options_weekDayShort_4"
+msgstr "Th"
+
+msgid "options_weekDayShort_5"
+msgstr "Fr"
+
+msgid "options_weekDayShort_6"
+msgstr "Sa"
+
 msgid "options_group_conditionHelp"
 msgstr "About Condition Types"
 

+ 44 - 0
omega-locales/zh_CN/LC_MESSAGES/omega-web.po

@@ -100,6 +100,26 @@ msgstr ""
 "设置规则类型为<code>(禁用)</code>可以临时禁用某个条件。禁用的条件在匹配时视为不存在。<br>条件被禁用后,仍然保存有之前的数据("
 "例如通配符或正则),因此当需要时,可以把条件类型改回之前的类型,以方便地重新启用条件。"
 
+msgid "condition_TimeCondition"
+msgstr "当前时间"
+
+msgid "condition_help_TimeCondition"
+msgstr ""
+"如果当前本地时间在某个范围内则匹配。此范围由<b>开始小时</b>和<b>结束小时</b>"
+"确定,包含开始的那个小时以及结束的那个小时。<br>"
+"本地时间、开始小时和结束小时均按照<b>24小时制</b>计算(从<b>0到23</b>)。<br>"
+"此条件大约在请求发出的瞬间,才计算是否匹配。"
+
+msgid "condition_WeekdayCondition"
+msgstr "每周几"
+
+msgid "condition_help_WeekdayCondition"
+msgstr ""
+"只在每周的某几天才匹配。可以在条件详情中勾选<b>星期几有效</b>。"
+"根据当地时区来计算现在是星期几,然后再查看当天是否选中。<br>"
+"假设在请求发送时是星期X:如果星期X被勾选,则匹配所有请求。否则不匹配任何请求。<br>"
+"除了日期以外,在匹配过程中不会参考请求的网址或任何其他信息。"
+
 msgid "condition_group_default"
 msgstr " "
 
@@ -570,6 +590,30 @@ msgstr "默认情景模式"
 msgid "options_hostLevelsBetween"
 msgstr "≤ 主机层数 ≤"
 
+msgid "options_hourBetween"
+msgstr "≤ 當前小時 ≤"
+
+msgid "options_weekDayShort_0"
+msgstr "日"
+
+msgid "options_weekDayShort_1"
+msgstr "一"
+
+msgid "options_weekDayShort_2"
+msgstr "二"
+
+msgid "options_weekDayShort_3"
+msgstr "三"
+
+msgid "options_weekDayShort_4"
+msgstr "四"
+
+msgid "options_weekDayShort_5"
+msgstr "五"
+
+msgid "options_weekDayShort_6"
+msgstr "六"
+
 msgid "options_group_conditionHelp"
 msgstr "条件类型说明"
 

+ 44 - 0
omega-locales/zh_TW/LC_MESSAGES/omega-web.po

@@ -100,6 +100,26 @@ msgstr ""
 "設定規則類型為<code>(禁用)</code>可以臨時禁用某個條件。禁用的條件在匹配時視為不存在。<br>條件被禁用後,仍然儲存有之前的資料("
 "例如通配符或正則),因此當需要時,可以把條件類型改回之前的類型,以方便地重新啟用條件。"
 
+msgid "condition_TimeCondition"
+msgstr "當前時間"
+
+msgid "condition_help_TimeCondition"
+msgstr ""
+"如果當前本地時間在某個範圍內則匹配。此範圍由<b>開始小時</b>和<b>結束小時</b>"
+"確定,包含開始的那個小時以及結束的那個小時。<br>"
+"本地時間、開始小時和結束小時均按照<b>24小時制</b>計算(從<b>0到23</b>)。<br>"
+"此條件大約在請求發出的瞬間,才計算是否匹配。"
+
+msgid "condition_WeekdayCondition"
+msgstr "每週幾"
+
+msgid "condition_help_WeekdayCondition"
+msgstr ""
+"只在每週的某幾天才匹配。可以在條件詳情中勾選<b>星期幾有效</b>。"
+"根據當地時區來計算現在是星期幾,然後再檢視當天是否選中。<br>"
+"假設在請求傳送時是星期X:如果星期X被勾選,則匹配所有請求。否則不匹配任何請求。<br>"
+"除了日期以外,在匹配過程中不會參考請求的網址或任何其他資訊。"
+
 msgid "condition_group_default"
 msgstr " "
 
@@ -570,6 +590,30 @@ msgstr "默認情景模式"
 msgid "options_hostLevelsBetween"
 msgstr "≤ 主機層數 ≤"
 
+msgid "options_hourBetween"
+msgstr "≤ current hour ≤"
+
+msgid "options_weekDayShort_0"
+msgstr "Su"
+
+msgid "options_weekDayShort_1"
+msgstr "Mo"
+
+msgid "options_weekDayShort_2"
+msgstr "Tu"
+
+msgid "options_weekDayShort_3"
+msgstr "We"
+
+msgid "options_weekDayShort_4"
+msgstr "Th"
+
+msgid "options_weekDayShort_5"
+msgstr "Fr"
+
+msgid "options_weekDayShort_6"
+msgstr "Sa"
+
 msgid "options_group_conditionHelp"
 msgstr "條件類型說明"
 

+ 6 - 0
omega-pac/src/conditions.coffee

@@ -197,6 +197,12 @@ module.exports = exports =
 
   localHosts: ["127.0.0.1", "[::1]", "localhost"]
 
+  getWeekdayList: (condition) ->
+    if condition.days
+      condition.days.charCodeAt(i) > 64 for i in [0...7]
+    else
+      condition.startDay <= i <= condition.endDay for i in [0...7]
+
   _condCache: new AttachedCache (condition) ->
     tag = exports._handler(condition.conditionType).tag
     result =

+ 4 - 3
omega-target-chromium-extension/background.coffee

@@ -65,6 +65,8 @@ actionForUrl = (url) ->
     details = ''
     direct = false
     attached = false
+    condition2Str = (condition) ->
+      condition.pattern || OmegaPac.Conditions.str(condition)
     for result in results
       if Array.isArray(result)
         if not result[1]?
@@ -87,7 +89,7 @@ actionForUrl = (url) ->
         else if typeof result[1] == 'string'
           details += "#{result[1]} => #{result[0]}\n"
         else
-          condition = (result[1].condition ? result[1]).pattern ? ''
+          condition = condition2Str(result[1].condition ? result[1])
           details += "#{condition} => "
           if result[0] == 'DIRECT'
             details += chrome.i18n.getMessage('browserAction_directResult')
@@ -101,8 +103,7 @@ actionForUrl = (url) ->
         else if attached
           details += chrome.i18n.getMessage('browserAction_attachedPrefix')
           attached = false
-        condition = (result.source ? result.condition.pattern ?
-          result.condition.conditionType)
+        condition = result.source ? condition2Str(result.condition)
         details += "#{condition} => #{dispName(result.profileName)}\n"
 
     if not details

+ 11 - 0
omega-web/src/omega/controllers/switch_profile.coffee

@@ -90,6 +90,8 @@ angular.module('omega').controller 'SwitchProfileCtrl', ($scope, $rootScope,
     {
       group: 'special'
       types: [
+        'WeekdayCondition'
+        'TimeCondition'
         'FalseCondition'
       ]
     }
@@ -191,6 +193,15 @@ angular.module('omega').controller 'SwitchProfileCtrl', ($scope, $rootScope,
       return pattern.indexOf(':') >= 0 || pattern.indexOf('/') >= 0
     return false
 
+  $scope.getWeekdayList = OmegaPac.Conditions.getWeekdayList
+  $scope.updateDay = (condition, i, selected) ->
+    condition.days ||= '-------'
+    char = if selected then 'SMTWtFs'[i] else '-'
+    condition.days = condition.days.substr(0, i) + char +
+      condition.days.substr(i + 1)
+    delete condition.startDay
+    delete condition.endDay
+
   $scope.removeRule = (index) ->
     removeForReal = ->
       $scope.profile.rules.splice index, 1

+ 11 - 0
omega-web/src/partials/profile_switch.jade

@@ -67,6 +67,17 @@ div(ng-controller='SwitchProfileCtrl')
                 span {{'options_hostLevelsBetween' | tr}}
                 = ' '
                 input.form-control(type='number' max='99' min='1' ng-model='rule.condition.maxValue' required)
+              span.host-levels-details(ng-switch-when='TimeCondition')
+                input.form-control(type='number' min='0' max='23' ng-model='rule.condition.startHour' required)
+                = ' '
+                span {{'options_hourBetween' | tr}}
+                = ' '
+                input.form-control(type='number' min='0' max='23'
+                  ng-model='rule.condition.endHour' required)
+              span.host-levels-details(ng-switch-when='WeekdayCondition')
+                label.checkbox-inline(ng-repeat='selected in getWeekdayList(rule.condition) track by $index')
+                  input(type='checkbox' ng-model='selected' ng-change='updateDay(rule.condition, $index, selected)')
+                  = '{{"options_weekDayShort_" + $index | tr}} '
               input.form-control(ng-model='rule.condition.pattern' ng-switch-default required
                 ui-validate='{pattern: "validateCondition(rule.condition, $value)"}')
             td.switch-rule-row-target