Skip to content

Commit 1b9b51d

Browse files
committed
add time tag day_of_week
1 parent 67432fc commit 1b9b51d

37 files changed

Lines changed: 760 additions & 189 deletions

app/src/main/java/spam/blocker/service/bot/Actions.kt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,10 @@ class ReadFile(
605605
}
606606

607607
override fun tooltip(ctx: Context): String {
608-
return ctx.getString(R.string.help_action_read_file)
608+
return ctx.getString(R.string.help_action_read_file).format(
609+
ctx.getString(R.string.path_tags),
610+
ctx.getString(R.string.time_tags)
611+
)
609612
}
610613

611614
override fun inputParamType(): List<ParamType> {
@@ -673,7 +676,10 @@ class WriteFile(
673676
}
674677

675678
override fun tooltip(ctx: Context): String {
676-
return ctx.getString(R.string.help_action_write_file)
679+
return ctx.getString(R.string.help_action_write_file).format(
680+
ctx.getString(R.string.path_tags),
681+
ctx.getString(R.string.time_tags)
682+
)
677683
}
678684

679685
override fun inputParamType(): List<ParamType> {

app/src/main/java/spam/blocker/ui/setting/quick/Contacts.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ fun Contacts() {
5555

5656
RadioGroup(items = items, selectedIndex = if (isStrict) 1 else 0) { clickedIdx ->
5757
isStrict = clickedIdx == 1
58-
logi("isStrict: $isStrict")
5958
spf.setStrict(isStrict)
6059
}
6160
}

app/src/main/java/spam/blocker/util/StringTag.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ fun String.resolveTimeTags(): String {
2121
.replace("{hour_index}", now.hour.toString())
2222
.replace("{minute_index}", now.minute.toString())
2323
.replace("{second_index}", now.second.toString())
24+
25+
.replace("{day_of_week}", now.dayOfWeek.toString())
26+
.replace("{day_of_week_index}", now.dayOfWeek.value.toString())
27+
28+
2429
}
2530

2631
fun String.resolvePathTags(): String {

app/src/main/res/values-ar/strings_13.xml

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
تنظيف قاعدة بيانات السجل، حذف السجلات قبل الطابع الزمني: %s.
44
</string>
55
<string name="cleaning_up_spam_db">
6-
تنظيف قاعدة بيانات الرسائل المزعجة، حذف %s سجلات قبل الطابع الزمني: %s".
6+
تنظيف قاعدة بيانات الرسائل المزعجة، حذف %s سجلات قبل الطابع الزمني: %s\".
77
</string>
88
<string name="resolved_url">عنوان URL المُحلَّل: %s</string>
99
<string name="time_cost">الوقت المستغرق: %s مللي ثانية.</string>
@@ -45,14 +45,31 @@
4545
</string>
4646
<string name="time_tags">
4747
<![CDATA[
48-
- <font color="#00BFFF"><b>{year}</b></font><br>
49-
&ensp; السنة، على سبيل المثال: 2024<br>
50-
- <font color="#00BFFF"><b>{month} {day}</b></font><br>
51-
&ensp; سيتم إضافة صفر بادئة إلى الرقم المكون من رقم واحد، على سبيل المثال: <br>
52-
&emsp; {month}_{day} -> 01_02<br>
53-
- <font color="#00BFFF"><b>{month_index} {day_index}</b></font><br>
54-
&ensp; سيتم إضافة هذه القيم بدون صفر بادئة، على سبيل المثال: <br>
55-
&emsp; {month}_{day} -> 1_2<br>
48+
<font color="#00BFFF"><b>{year}</b></font><br>
49+
<font color="#00BFFF"><b>{month}</b></font><br>
50+
<font color="#00BFFF"><b>{day}</b></font><br>
51+
<font color="#00BFFF"><b>{hour}</b></font><br>
52+
<font color="#00BFFF"><b>{minute}</b></font><br>
53+
<font color="#00BFFF"><b>{second}</b></font><br>
54+
&ensp; سيتم حشو الأرقام المكونة من رقم واحد بصفر بادئ، مثال: <br>
55+
&emsp; <font color="#888888">{year}-{month}-{day} {hour}:{minute}:{second}</font> <br>
56+
&emsp; يصبح <br>
57+
&emsp; <font color="#888888">2020-01-22 03:44:05</font><br>
58+
<br>
59+
<font color="#00BFFF"><b>{month_index}</b></font><br>
60+
<font color="#00BFFF"><b>{day_index}</b></font><br>
61+
<font color="#00BFFF"><b>{hour_index}</b></font><br>
62+
<font color="#00BFFF"><b>{minute_index}</b></font><br>
63+
<font color="#00BFFF"><b>{second_index}</b></font><br>
64+
&ensp; هذه القيم لن يتم حشوها، مثال: <br>
65+
&emsp; <font color="#888888">{month_index}-{day_index}</font> <br>
66+
&emsp; يصبح <br>
67+
&emsp; <font color="#888888">1-2</font><br>
68+
<br>
69+
<font color="#00BFFF"><b>{day_of_week}</b></font><br>
70+
<font color="#00BFFF"><b>{day_of_week_index}</b></font><br>
71+
&ensp; يمكن استخدام هذه القيم لمحاكاة جدول تدوير، على سبيل المثال: <br>
72+
&emsp; <font color="#888888">إجراء نسخ احتياطية يومية والاحتفاظ بأحدث سبعة نسخ احتياطية فقط.</font> <br>
5673
]]>
5774
</string>
5875
<string name="help_http_url">
@@ -81,7 +98,7 @@
8198
1. سجل حسابًا على <a href="https://phoneblock.net/phoneblock/login">https://phoneblock.net/phoneblock/login</a><br>
8299
<br>
83100
2. في صفحة الإعدادات: <a href="https://phoneblock.net/phoneblock/settings">https://phoneblock.net/phoneblock/settings</a>,
84-
اضغط على زر "Generate API key".<br>
101+
اضغط على زر \"Generate API key\".<br>
85102
<br>
86103
3. املأ مفتاح API الذي تم إنشاؤه أدناه.
87104
]]>

app/src/main/res/values-ar/strings_8.xml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,28 @@
8989
</string>
9090
<string name="help_action_read_file">
9191
<![CDATA[
92-
الحصول على <u>وحدات بايت للمحتوى</u> من ملف.
92+
الحصول على <u>بايتات المحتوى</u> من ملف. <br>
93+
<br>
94+
علامات <font color="#03DAC5"><b>المسار</b></font> المدعومة: <br>
95+
<br>
96+
%s <br>
97+
<br>
98+
علامات <font color="#03DAC5"><b>اسم الملف</b></font> المدعومة: <br>
99+
<br>
100+
%s
93101
]]>
94102
</string>
95103
<string name="help_action_write_file">
96104
<![CDATA[
97-
كتابة <u>وحدات بايت للمحتوى</u> إلى ملف.
105+
كتابة <u>بايتات المحتوى</u> إلى ملف. <br>
106+
<br>
107+
علامات <font color="#03DAC5"><b>المسار</b></font> المدعومة: <br>
108+
<br>
109+
%s <br>
110+
<br>
111+
علامات <font color="#03DAC5"><b>اسم الملف</b></font> المدعومة: <br>
112+
<br>
113+
%s
98114
]]>
99115
</string>
100116
<string name="help_action_parse_csv">

app/src/main/res/values-ca/strings_13.xml

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Netejant la base de dades de l\'historial, suprimint els registres anteriors a la marca de temps: %s.
44
</string>
55
<string name="cleaning_up_spam_db">
6-
Netejant la base de dades de correu brossa, suprimint %s registres anteriors a la marca de temps: %s".
6+
Netejant la base de dades de correu brossa, suprimint %s registres anteriors a la marca de temps: %s\".
77
</string>
88
<string name="resolved_url">URL resolta: %s</string>
99
<string name="time_cost">Temps emprat: %s mil·lisegons.</string>
@@ -45,14 +45,31 @@
4545
</string>
4646
<string name="time_tags">
4747
<![CDATA[
48-
- <font color="#00BFFF"><b>{year}</b></font><br>
49-
&ensp; L\'any, per exemple: 2024<br>
50-
- <font color="#00BFFF"><b>{month} {day}</b></font><br>
51-
&ensp; El número d\'un sol dígit s\'omplirà amb un zero inicial, per exemple: <br>
52-
&emsp; {month}_{day} -> 01_02<br>
53-
- <font color="#00BFFF"><b>{month_index} {day_index}</b></font><br>
54-
&ensp; Aquests valors s\'ompliran sense un zero inicial, per exemple: <br>
55-
&emsp; {month}_{day} -> 1_2<br>
48+
<font color="#00BFFF"><b>{year}</b></font><br>
49+
<font color="#00BFFF"><b>{month}</b></font><br>
50+
<font color="#00BFFF"><b>{day}</b></font><br>
51+
<font color="#00BFFF"><b>{hour}</b></font><br>
52+
<font color="#00BFFF"><b>{minute}</b></font><br>
53+
<font color="#00BFFF"><b>{second}</b></font><br>
54+
&ensp; Els números d\'un sol dígit s\'emplenaran amb un zero inicial, per exemple: <br>
55+
&emsp; <font color="#888888">{year}-{month}-{day} {hour}:{minute}:{second}</font> <br>
56+
&emsp; esdevé <br>
57+
&emsp; <font color="#888888">2020-01-22 03:44:05</font><br>
58+
<br>
59+
<font color="#00BFFF"><b>{month_index}</b></font><br>
60+
<font color="#00BFFF"><b>{day_index}</b></font><br>
61+
<font color="#00BFFF"><b>{hour_index}</b></font><br>
62+
<font color="#00BFFF"><b>{minute_index}</b></font><br>
63+
<font color="#00BFFF"><b>{second_index}</b></font><br>
64+
&ensp; Aquests valors no s\'emplenaran, per exemple: <br>
65+
&emsp; <font color="#888888">{month_index}-{day_index}</font> <br>
66+
&emsp; esdevé <br>
67+
&emsp; <font color="#888888">1-2</font><br>
68+
<br>
69+
<font color="#00BFFF"><b>{day_of_week}</b></font><br>
70+
<font color="#00BFFF"><b>{day_of_week_index}</b></font><br>
71+
&ensp; Aquests es poden utilitzar per simular un calendari de rotació, per exemple: <br>
72+
&emsp; <font color="#888888">Realitzar còpies de seguretat diàries i només conservar les set còpies de seguretat més recents.</font> <br>
5673
]]>
5774
</string>
5875
<string name="help_http_url">
@@ -81,7 +98,7 @@
8198
1. Registreu un compte a <a href="https://phoneblock.net/phoneblock/login">https://phoneblock.net/phoneblock/login</a><br>
8299
<br>
83100
2. A la pàgina de configuració: <a href="https://phoneblock.net/phoneblock/settings">https://phoneblock.net/phoneblock/settings</a>,
84-
premeu el botó "Genera clau API".<br>
101+
premeu el botó \"Genera clau API\".<br>
85102
<br>
86103
3. Introduïu la clau API generada a continuació.
87104
]]>

app/src/main/res/values-ca/strings_8.xml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,28 @@
8989
</string>
9090
<string name="help_action_read_file">
9191
<![CDATA[
92-
Obteniu els <u>bytes de contingut</u> d\'un fitxer.
92+
Obtenir els <u>bytes de contingut</u> d\'un fitxer. <br>
93+
<br>
94+
Etiquetes de <font color="#03DAC5"><b>ruta</b></font> admeses: <br>
95+
<br>
96+
%s <br>
97+
<br>
98+
Etiquetes de <font color="#03DAC5"><b>nom de fitxer</b></font> admeses: <br>
99+
<br>
100+
%s
93101
]]>
94102
</string>
95103
<string name="help_action_write_file">
96104
<![CDATA[
97-
Escriu <u>bytes de contingut</u> a un fitxer.
105+
Escriure <u>bytes de contingut</u> a un fitxer. <br>
106+
<br>
107+
Etiquetes de <font color="#03DAC5"><b>ruta</b></font> admeses: <br>
108+
<br>
109+
%s <br>
110+
<br>
111+
Etiquetes de <font color="#03DAC5"><b>nom de fitxer</b></font> admeses: <br>
112+
<br>
113+
%s
98114
]]>
99115
</string>
100116
<string name="help_action_parse_csv">

app/src/main/res/values-de/strings_13.xml

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
1. Registrieren Sie ein Konto unter <a href="https://phoneblock.net/phoneblock/login">https://phoneblock.net/phoneblock/login</a><br>
5959
<br>
6060
2. Auf der Einstellungsseite: <a href="https://phoneblock.net/phoneblock/settings">https://phoneblock.net/phoneblock/settings</a>,
61-
drücken Sie die Schaltfläche "API-Schlüssel generieren".<br>
61+
drücken Sie die Schaltfläche \"API-Schlüssel generieren\".<br>
6262
<br>
6363
3. Tragen Sie den generierten API-Schlüssel unten ein.
6464
]]>
@@ -89,14 +89,31 @@
8989
</string>
9090
<string name="time_tags">
9191
<![CDATA[
92-
- <font color="#00BFFF"><b>{year}</b></font><br>
93-
&ensp; Das Jahr, z.B.: 2024<br>
94-
- <font color="#00BFFF"><b>{month} {day}</b></font><br>
95-
&ensp; Einstellige Zahlen werden mit einer führenden Null aufgefüllt, z.B.: <br>
96-
&emsp; {month}_{day} -> 01_02<br>
97-
- <font color="#00BFFF"><b>{month_index} {day_index}</b></font><br>
98-
&ensp; Diese Werte werden ohne führende Null aufgefüllt, z.B.: <br>
99-
&emsp; {month}_{day} -> 1_2<br>
92+
<font color="#00BFFF"><b>{year}</b></font><br>
93+
<font color="#00BFFF"><b>{month}</b></font><br>
94+
<font color="#00BFFF"><b>{day}</b></font><br>
95+
<font color="#00BFFF"><b>{hour}</b></font><br>
96+
<font color="#00BFFF"><b>{minute}</b></font><br>
97+
<font color="#00BFFF"><b>{second}</b></font><br>
98+
&ensp; Einzellne Ziffern werden mit einer führenden Null aufgefüllt, z.B.: <br>
99+
&emsp; <font color="#888888">{year}-{month}-{day} {hour}:{minute}:{second}</font> <br>
100+
&emsp; wird zu <br>
101+
&emsp; <font color="#888888">2020-01-22 03:44:05</font><br>
102+
<br>
103+
<font color="#00BFFF"><b>{month_index}</b></font><br>
104+
<font color="#00BFFF"><b>{day_index}</b></font><br>
105+
<font color="#00BFFF"><b>{hour_index}</b></font><br>
106+
<font color="#00BFFF"><b>{minute_index}</b></font><br>
107+
<font color="#00BFFF"><b>{second_index}</b></font><br>
108+
&ensp; Diese Werte werden nicht aufgefüllt, z.B.: <br>
109+
&emsp; <font color="#888888">{month_index}-{day_index}</font> <br>
110+
&emsp; wird zu <br>
111+
&emsp; <font color="#888888">1-2</font><br>
112+
<br>
113+
<font color="#00BFFF"><b>{day_of_week}</b></font><br>
114+
<font color="#00BFFF"><b>{day_of_week_index}</b></font><br>
115+
&ensp; Diese können verwendet werden, um einen Rotationsplan zu simulieren, zum Beispiel: <br>
116+
&emsp; <font color="#888888">Tägliche Sicherungen durchführen und nur die sieben aktuellsten Sicherungen aufbewahren.</font> <br>
100117
]]>
101118
</string>
102119
<string name="skip_alpha_empty_number">Alpha- oder leere Nummer überspringen.</string>

app/src/main/res/values-de/strings_8.xml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,28 @@
7878
</string>
7979
<string name="help_action_read_file">
8080
<![CDATA[
81-
Laden Sie die <u>Inhaltsbytes</u> aus einer Datei.
81+
Die <u>Inhaltsbytes</u> aus einer Datei abrufen. <br>
82+
<br>
83+
Unterstützte <font color="#03DAC5"><b>Pfad</b></font>-Tags: <br>
84+
<br>
85+
%s <br>
86+
<br>
87+
Unterstützte <font color="#03DAC5"><b>Dateinamen</b></font>-Tags: <br>
88+
<br>
89+
%s
8290
]]>
8391
</string>
8492
<string name="help_action_write_file">
8593
<![CDATA[
86-
Schreiben Sie <u>Inhaltsbytes</u> in eine Datei.
94+
<u>Inhaltsbytes</u> in eine Datei schreiben. <br>
95+
<br>
96+
Unterstützte <font color="#03DAC5"><b>Pfad</b></font>-Tags: <br>
97+
<br>
98+
%s <br>
99+
<br>
100+
Unterstützte <font color="#03DAC5"><b>Dateinamen</b></font>-Tags: <br>
101+
<br>
102+
%s
87103
]]>
88104
</string>
89105
<string name="help_action_parse_csv">

app/src/main/res/values-es/strings_13.xml

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Limpiando la base de datos de historial, eliminando registros anteriores a la marca de tiempo: %s.
44
</string>
55
<string name="cleaning_up_spam_db">
6-
Limpiando la base de datos de llamadas spam, eliminando %s registros anteriores a la marca de tiempo: %s".
6+
Limpiando la base de datos de llamadas spam, eliminando %s registros anteriores a la marca de tiempo: %s\".
77
</string>
88
<string name="resolved_url">URL resuelta: %s.</string>
99
<string name="time_cost">Tiempo de coste: %s milisegundos.</string>
@@ -58,7 +58,7 @@
5858
1. Registra una cuenta en <a href="https://phoneblock.net/phoneblock/login">https://phoneblock.net/phoneblock/login</a><br>
5959
<br>
6060
2. En la página de configuración: <a href="https://phoneblock.net/phoneblock/settings">https://phoneblock.net/phoneblock/settings</a>,
61-
pulsa el botón "Generar clave API".<br>
61+
pulsa el botón \"Generar clave API\".<br>
6262
<br>
6363
3. Rellena la clave API generada a continuación.
6464
]]>
@@ -89,14 +89,31 @@
8989
</string>
9090
<string name="time_tags">
9191
<![CDATA[
92-
- <font color="#00BFFF"><b>{year}</b></font><br>
93-
&ensp; El año, ej.: 2024<br>
94-
- <font color="#00BFFF"><b>{month} {day}</b></font><br>
95-
&ensp; Los números de un solo dígito se rellenarán con un cero a la izquierda, ej.: <br>
96-
&emsp; {month}_{day} -> 01_02<br>
97-
- <font color="#00BFFF"><b>{month_index} {day_index}</b></font><br>
98-
&ensp; Estos valores se rellenarán sin cero a la izquierda, ej.: <br>
99-
&emsp; {month}_{day} -> 1_2<br>
92+
<font color="#00BFFF"><b>{year}</b></font><br>
93+
<font color="#00BFFF"><b>{month}</b></font><br>
94+
<font color="#00BFFF"><b>{day}</b></font><br>
95+
<font color="#00BFFF"><b>{hour}</b></font><br>
96+
<font color="#00BFFF"><b>{minute}</b></font><br>
97+
<font color="#00BFFF"><b>{second}</b></font><br>
98+
&ensp; Los números de un solo dígito se rellenarán con un cero inicial, ej.: <br>
99+
&emsp; <font color="#888888">{year}-{month}-{day} {hour}:{minute}:{second}</font> <br>
100+
&emsp; se convierte en <br>
101+
&emsp; <font color="#888888">2020-01-22 03:44:05</font><br>
102+
<br>
103+
<font color="#00BFFF"><b>{month_index}</b></font><br>
104+
<font color="#00BFFF"><b>{day_index}</b></font><br>
105+
<font color="#00BFFF"><b>{hour_index}</b></font><br>
106+
<font color="#00BFFF"><b>{minute_index}</b></font><br>
107+
<font color="#00BFFF"><b>{second_index}</b></font><br>
108+
&ensp; Estos valores no se rellenarán, ej.: <br>
109+
&emsp; <font color="#888888">{month_index}-{day_index}</font> <br>
110+
&emsp; se convierte en <br>
111+
&emsp; <font color="#888888">1-2</font><br>
112+
<br>
113+
<font color="#00BFFF"><b>{day_of_week}</b></font><br>
114+
<font color="#00BFFF"><b>{day_of_week_index}</b></font><br>
115+
&ensp; Estos pueden usarse para simular una programación de rotación, por ejemplo: <br>
116+
&emsp; <font color="#888888">Realizar copias de seguridad diarias y conservar solo las siete más recientes.</font> <br>
100117
]]>
101118
</string>
102119
<string name="skip_alpha_empty_number">Omitir número alfabético o vacío.</string>

0 commit comments

Comments
 (0)