Преглед изворни кода

Replace translation status flags with text section (#7842)

* Replace translation status flags with text section

* make fix-all

* Update README.md

Co-authored-by: maTh <1645099+math-GH@users.noreply.github.com>

* Improve with suggestions

* Improve with further suggestions

* fix headers

* BCP 47
https://developer.mozilla.org/en-US/docs/Glossary/BCP_47_language_tag

* en-US: `TODO` -> `IGNORE`

* i18n: fr

* i18n: fr

* i18n: fr

* Links

---------

Co-authored-by: maTh <1645099+math-GH@users.noreply.github.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Inverle пре 6 месеци
родитељ
комит
be49726ebb
61 измењених фајлова са 182 додато и 306 уклоњено
  1. 0 3
      README.fr.md
  2. 0 3
      README.md
  3. 5 1
      app/i18n/cs/gen.php
  4. 5 1
      app/i18n/de/gen.php
  5. 5 1
      app/i18n/el/gen.php
  6. 4 4
      app/i18n/en-us/api.php
  7. 5 1
      app/i18n/en-us/gen.php
  8. 5 1
      app/i18n/en/gen.php
  9. 5 1
      app/i18n/es/gen.php
  10. 5 1
      app/i18n/fa/gen.php
  11. 5 1
      app/i18n/fi/gen.php
  12. 5 1
      app/i18n/fr/gen.php
  13. 5 1
      app/i18n/he/gen.php
  14. 5 1
      app/i18n/hu/gen.php
  15. 5 1
      app/i18n/id/gen.php
  16. 5 1
      app/i18n/it/gen.php
  17. 5 1
      app/i18n/ja/gen.php
  18. 5 1
      app/i18n/ko/gen.php
  19. 5 1
      app/i18n/lv/gen.php
  20. 5 1
      app/i18n/nl/gen.php
  21. 5 1
      app/i18n/oc/gen.php
  22. 5 1
      app/i18n/pl/gen.php
  23. 5 1
      app/i18n/pt-br/gen.php
  24. 5 1
      app/i18n/pt-pt/gen.php
  25. 5 1
      app/i18n/ru/gen.php
  26. 5 1
      app/i18n/sk/gen.php
  27. 5 1
      app/i18n/tr/gen.php
  28. 5 1
      app/i18n/uk/gen.php
  29. 5 1
      app/i18n/zh-cn/gen.php
  30. 5 1
      app/i18n/zh-tw/gen.php
  31. 2 2
      cli/README.md
  32. 41 75
      cli/check.translation.php
  33. 0 5
      docs/i18n/flags/README.md
  34. 0 7
      docs/i18n/flags/gen/cs.svg
  35. 0 7
      docs/i18n/flags/gen/de.svg
  36. 0 7
      docs/i18n/flags/gen/el.svg
  37. 0 7
      docs/i18n/flags/gen/en-us.svg
  38. 0 7
      docs/i18n/flags/gen/en.svg
  39. 0 7
      docs/i18n/flags/gen/es.svg
  40. 0 7
      docs/i18n/flags/gen/fa.svg
  41. 0 7
      docs/i18n/flags/gen/fi.svg
  42. 0 7
      docs/i18n/flags/gen/fr.svg
  43. 0 7
      docs/i18n/flags/gen/he.svg
  44. 0 7
      docs/i18n/flags/gen/hu.svg
  45. 0 7
      docs/i18n/flags/gen/id.svg
  46. 0 7
      docs/i18n/flags/gen/it.svg
  47. 0 7
      docs/i18n/flags/gen/ja.svg
  48. 0 7
      docs/i18n/flags/gen/ko.svg
  49. 0 7
      docs/i18n/flags/gen/lv.svg
  50. 0 7
      docs/i18n/flags/gen/nl.svg
  51. 0 5
      docs/i18n/flags/gen/oc.svg
  52. 0 7
      docs/i18n/flags/gen/pl.svg
  53. 0 7
      docs/i18n/flags/gen/pt-br.svg
  54. 0 7
      docs/i18n/flags/gen/pt-pt.svg
  55. 0 7
      docs/i18n/flags/gen/ru.svg
  56. 0 7
      docs/i18n/flags/gen/sk.svg
  57. 0 7
      docs/i18n/flags/gen/tr.svg
  58. 0 7
      docs/i18n/flags/gen/uk.svg
  59. 0 7
      docs/i18n/flags/gen/zh-cn.svg
  60. 0 7
      docs/i18n/flags/gen/zh-tw.svg
  61. 0 0
      docs/i18n/flags/oc.svg

Разлика између датотеке није приказан због своје велике величине
+ 0 - 3
README.fr.md


Разлика између датотеке није приказан због своје велике величине
+ 0 - 3
README.md


+ 5 - 1
app/i18n/cs/gen.php

@@ -136,7 +136,6 @@ return array(
 		'yesterday' => 'Včera',
 	),
 	'dir' => 'ltr',	// IGNORE
-	'flag' => '🇨🇿',
 	'freshrss' => array(
 		'_' => 'FreshRSS',	// IGNORE
 		'about' => 'O FreshRSS',
@@ -217,6 +216,11 @@ return array(
 		'weeks' => 'týdnů',
 		'years' => 'let',
 	),
+	'readme' => array(
+		'contribute' => 'contribute',	// IGNORE
+		'language' => 'Language',	// IGNORE
+		'translated' => 'Progress',	// IGNORE
+	),
 	'share' => array(
 		'Known' => 'Známé základní stránky',
 		'archiveIS' => 'archive.is',	// IGNORE

+ 5 - 1
app/i18n/de/gen.php

@@ -136,7 +136,6 @@ return array(
 		'yesterday' => 'Gestern',
 	),
 	'dir' => 'ltr',	// IGNORE
-	'flag' => '🇩🇪',
 	'freshrss' => array(
 		'_' => 'FreshRSS',	// IGNORE
 		'about' => 'Über FreshRSS',
@@ -217,6 +216,11 @@ return array(
 		'weeks' => 'Wochen',
 		'years' => 'Jahre',
 	),
+	'readme' => array(
+		'contribute' => 'contribute',	// IGNORE
+		'language' => 'Language',	// IGNORE
+		'translated' => 'Progress',	// IGNORE
+	),
 	'share' => array(
 		'Known' => 'Known-Seite (https://withknown.com)',
 		'archiveIS' => 'archive.is',	// IGNORE

+ 5 - 1
app/i18n/el/gen.php

@@ -136,7 +136,6 @@ return array(
 		'yesterday' => 'Yesterday',	// TODO
 	),
 	'dir' => 'ltr',	// TODO
-	'flag' => '🇬🇷',
 	'freshrss' => array(
 		'_' => 'FreshRSS',	// TODO
 		'about' => 'About FreshRSS',	// TODO
@@ -217,6 +216,11 @@ return array(
 		'weeks' => 'weeks',	// TODO
 		'years' => 'years',	// TODO
 	),
+	'readme' => array(
+		'contribute' => 'contribute',	// IGNORE
+		'language' => 'Language',	// IGNORE
+		'translated' => 'Progress',	// IGNORE
+	),
 	'share' => array(
 		'Known' => 'Known based sites',	// TODO
 		'archiveIS' => 'archive.is',	// IGNORE

+ 4 - 4
app/i18n/en-us/api.php

@@ -14,10 +14,10 @@ return array(
 	'information' => array(
 		'address' => 'Your API address:',	// IGNORE
 		'output' => array(
-			'encoding-support' => '⚠️ WARN: no <code>%2F</code> support, some clients might not work!',	// TODO
-			'invalid-configuration' => '⚠️ WARN: Probable invalid base URL in ./data/config.php',	// TODO
-			'pass' => '✔️ PASS',	// TODO
-			'unknown-error' => '❌ ',	// TODO
+			'encoding-support' => '⚠️ WARN: no <code>%2F</code> support, some clients might not work!',	// IGNORE
+			'invalid-configuration' => '⚠️ WARN: Probable invalid base URL in ./data/config.php',	// IGNORE
+			'pass' => '✔️ PASS',	// IGNORE
+			'unknown-error' => '❌ ',	// IGNORE
 		),
 		'test' => array(
 			'fever' => 'Fever API configuration test:',	// IGNORE

+ 5 - 1
app/i18n/en-us/gen.php

@@ -136,7 +136,6 @@ return array(
 		'yesterday' => 'Yesterday',	// IGNORE
 	),
 	'dir' => 'ltr',	// IGNORE
-	'flag' => '🇺🇸',
 	'freshrss' => array(
 		'_' => 'FreshRSS',	// IGNORE
 		'about' => 'About FreshRSS',	// IGNORE
@@ -217,6 +216,11 @@ return array(
 		'weeks' => 'weeks',	// IGNORE
 		'years' => 'years',	// IGNORE
 	),
+	'readme' => array(
+		'contribute' => 'contribute',	// IGNORE
+		'language' => 'Language',	// IGNORE
+		'translated' => 'Progress',	// IGNORE
+	),
 	'share' => array(
 		'Known' => 'Known based sites',	// IGNORE
 		'archiveIS' => 'archive.is',	// IGNORE

+ 5 - 1
app/i18n/en/gen.php

@@ -136,7 +136,6 @@ return array(
 		'yesterday' => 'Yesterday',
 	),
 	'dir' => 'ltr',
-	'flag' => '🇬🇧',
 	'freshrss' => array(
 		'_' => 'FreshRSS',
 		'about' => 'About FreshRSS',
@@ -217,6 +216,11 @@ return array(
 		'weeks' => 'weeks',
 		'years' => 'years',
 	),
+	'readme' => array(
+		'contribute' => 'contribute',
+		'language' => 'Language',
+		'translated' => 'Progress',
+	),
 	'share' => array(
 		'Known' => 'Known based sites',
 		'archiveIS' => 'archive.is',

+ 5 - 1
app/i18n/es/gen.php

@@ -136,7 +136,6 @@ return array(
 		'yesterday' => 'Ayer',
 	),
 	'dir' => 'ltr',	// IGNORE
-	'flag' => '🇪🇸',
 	'freshrss' => array(
 		'_' => 'FreshRSS',	// IGNORE
 		'about' => 'Acerca de FreshRSS',
@@ -217,6 +216,11 @@ return array(
 		'weeks' => 'semanas',
 		'years' => 'años',
 	),
+	'readme' => array(
+		'contribute' => 'contribute',	// IGNORE
+		'language' => 'Language',	// IGNORE
+		'translated' => 'Progress',	// IGNORE
+	),
 	'share' => array(
 		'Known' => 'Sitios basados en conocidos',
 		'archiveIS' => 'archive.is',	// IGNORE

+ 5 - 1
app/i18n/fa/gen.php

@@ -136,7 +136,6 @@ return array(
 		'yesterday' => ' دیروز',
 	),
 	'dir' => 'rtl',
-	'flag' => '🇮🇷',
 	'freshrss' => array(
 		'_' => ' FreshRSS',
 		'about' => 'درباره FreshRSS',
@@ -217,6 +216,11 @@ return array(
 		'weeks' => ' هفته',
 		'years' => ' سال',
 	),
+	'readme' => array(
+		'contribute' => 'contribute',	// IGNORE
+		'language' => 'Language',	// IGNORE
+		'translated' => 'Progress',	// IGNORE
+	),
 	'share' => array(
 		'Known' => ' سایت های مبتنی بر شناخته شده',
 		'archiveIS' => 'archive.is',	// IGNORE

+ 5 - 1
app/i18n/fi/gen.php

@@ -136,7 +136,6 @@ return array(
 		'yesterday' => 'Eilen',
 	),
 	'dir' => 'ltr',	// IGNORE
-	'flag' => '🇫🇮',
 	'freshrss' => array(
 		'_' => 'FreshRSS',	// IGNORE
 		'about' => 'Tietoja FreshRSS-sovelluksesta',
@@ -217,6 +216,11 @@ return array(
 		'weeks' => 'viikkoa',
 		'years' => 'vuotta',
 	),
+	'readme' => array(
+		'contribute' => 'contribute',	// IGNORE
+		'language' => 'Language',	// IGNORE
+		'translated' => 'Progress',	// IGNORE
+	),
 	'share' => array(
 		'Known' => 'Known-sivustot',
 		'archiveIS' => 'archive.is',	// IGNORE

+ 5 - 1
app/i18n/fr/gen.php

@@ -136,7 +136,6 @@ return array(
 		'yesterday' => 'Hier',
 	),
 	'dir' => 'ltr',	// IGNORE
-	'flag' => '🇫🇷',
 	'freshrss' => array(
 		'_' => 'FreshRSS',	// IGNORE
 		'about' => 'À propos de FreshRSS',
@@ -217,6 +216,11 @@ return array(
 		'weeks' => 'semaines',
 		'years' => 'années',
 	),
+	'readme' => array(
+		'contribute' => 'contribuer',
+		'language' => 'Langage',
+		'translated' => 'Progression',
+	),
 	'share' => array(
 		'Known' => 'Sites basés sur Known',
 		'archiveIS' => 'archive.is',	// IGNORE

+ 5 - 1
app/i18n/he/gen.php

@@ -136,7 +136,6 @@ return array(
 		'yesterday' => 'אתמול',
 	),
 	'dir' => 'rtl',
-	'flag' => '🇮🇱',
 	'freshrss' => array(
 		'_' => 'FreshRSS',	// TODO
 		'about' => 'אודות FreshRSS',
@@ -217,6 +216,11 @@ return array(
 		'weeks' => 'weeks',	// TODO
 		'years' => 'years',	// TODO
 	),
+	'readme' => array(
+		'contribute' => 'contribute',	// IGNORE
+		'language' => 'Language',	// IGNORE
+		'translated' => 'Progress',	// IGNORE
+	),
 	'share' => array(
 		'Known' => 'Known based sites',	// TODO
 		'archiveIS' => 'archive.is',	// IGNORE

+ 5 - 1
app/i18n/hu/gen.php

@@ -136,7 +136,6 @@ return array(
 		'yesterday' => 'Tegnap',
 	),
 	'dir' => 'ltr',	// IGNORE
-	'flag' => '🇭🇺',
 	'freshrss' => array(
 		'_' => 'FreshRSS',	// IGNORE
 		'about' => 'FreshRSS névjegy',
@@ -217,6 +216,11 @@ return array(
 		'weeks' => 'hét',
 		'years' => 'év',
 	),
+	'readme' => array(
+		'contribute' => 'contribute',	// IGNORE
+		'language' => 'Language',	// IGNORE
+		'translated' => 'Progress',	// IGNORE
+	),
 	'share' => array(
 		'Known' => 'Ismert weboldalak',
 		'archiveIS' => 'archive.is',	// IGNORE

+ 5 - 1
app/i18n/id/gen.php

@@ -136,7 +136,6 @@ return array(
 		'yesterday' => 'Kemarin',
 	),
 	'dir' => 'ltr',	// IGNORE
-	'flag' => '🇮🇩',
 	'freshrss' => array(
 		'_' => 'FreshRSS',	// IGNORE
 		'about' => 'Tentang FreshRSS',
@@ -217,6 +216,11 @@ return array(
 		'weeks' => 'minggu',
 		'years' => 'tahun',
 	),
+	'readme' => array(
+		'contribute' => 'contribute',	// IGNORE
+		'language' => 'Language',	// IGNORE
+		'translated' => 'Progress',	// IGNORE
+	),
 	'share' => array(
 		'Known' => 'Situs berbasis Known',
 		'archiveIS' => 'archive.is',	// IGNORE

+ 5 - 1
app/i18n/it/gen.php

@@ -136,7 +136,6 @@ return array(
 		'yesterday' => 'Ieri',
 	),
 	'dir' => 'ltr',	// IGNORE
-	'flag' => '🇮🇹',
 	'freshrss' => array(
 		'_' => 'Feed RSS Reader',
 		'about' => 'Informazioni',
@@ -217,6 +216,11 @@ return array(
 		'weeks' => 'settimane',
 		'years' => 'anni',
 	),
+	'readme' => array(
+		'contribute' => 'contribute',	// IGNORE
+		'language' => 'Language',	// IGNORE
+		'translated' => 'Progress',	// IGNORE
+	),
 	'share' => array(
 		'Known' => 'Siti basati su Known',
 		'archiveIS' => 'archive.is',	// IGNORE

+ 5 - 1
app/i18n/ja/gen.php

@@ -136,7 +136,6 @@ return array(
 		'yesterday' => '昨日',
 	),
 	'dir' => 'ディレクトリ',
-	'flag' => '🇯🇵',
 	'freshrss' => array(
 		'_' => 'FreshRSS',	// IGNORE
 		'about' => 'FreshRSSについて',
@@ -217,6 +216,11 @@ return array(
 		'weeks' => '週間',
 		'years' => '年間',
 	),
+	'readme' => array(
+		'contribute' => 'contribute',	// IGNORE
+		'language' => 'Language',	// IGNORE
+		'translated' => 'Progress',	// IGNORE
+	),
 	'share' => array(
 		'Known' => 'よく使われるサイト',
 		'archiveIS' => 'archive.is',	// IGNORE

+ 5 - 1
app/i18n/ko/gen.php

@@ -136,7 +136,6 @@ return array(
 		'yesterday' => '어제',
 	),
 	'dir' => 'ltr',	// IGNORE
-	'flag' => '🇰🇷',
 	'freshrss' => array(
 		'_' => 'FreshRSS',	// IGNORE
 		'about' => '정보',
@@ -217,6 +216,11 @@ return array(
 		'weeks' => '주',
 		'years' => '년',
 	),
+	'readme' => array(
+		'contribute' => 'contribute',	// IGNORE
+		'language' => 'Language',	// IGNORE
+		'translated' => 'Progress',	// IGNORE
+	),
 	'share' => array(
 		'Known' => 'Known based sites',	// IGNORE
 		'archiveIS' => 'archive.is',	// IGNORE

+ 5 - 1
app/i18n/lv/gen.php

@@ -136,7 +136,6 @@ return array(
 		'yesterday' => 'Vakar',
 	),
 	'dir' => 'ltr',	// IGNORE
-	'flag' => '🇱🇻',
 	'freshrss' => array(
 		'_' => 'FreshRSS',	// TODO
 		'about' => 'Par FreshRSS',
@@ -217,6 +216,11 @@ return array(
 		'weeks' => 'nedēļas',
 		'years' => 'gadi',
 	),
+	'readme' => array(
+		'contribute' => 'contribute',	// IGNORE
+		'language' => 'Language',	// IGNORE
+		'translated' => 'Progress',	// IGNORE
+	),
 	'share' => array(
 		'Known' => 'Zināmas vietnes',
 		'archiveIS' => 'archive.is',	// IGNORE

+ 5 - 1
app/i18n/nl/gen.php

@@ -136,7 +136,6 @@ return array(
 		'yesterday' => 'Gisteren',
 	),
 	'dir' => 'ltr',	// IGNORE
-	'flag' => '🇳🇱',
 	'freshrss' => array(
 		'_' => 'FreshRSS',	// IGNORE
 		'about' => 'Over FreshRSS',
@@ -217,6 +216,11 @@ return array(
 		'weeks' => 'weken',
 		'years' => 'jaren',
 	),
+	'readme' => array(
+		'contribute' => 'contribute',	// IGNORE
+		'language' => 'Language',	// IGNORE
+		'translated' => 'Progress',	// IGNORE
+	),
 	'share' => array(
 		'Known' => 'Known-gebaseerde sites',
 		'archiveIS' => 'archive.is',	// IGNORE

+ 5 - 1
app/i18n/oc/gen.php

@@ -136,7 +136,6 @@ return array(
 		'yesterday' => 'Ièr',
 	),
 	'dir' => 'ltr',	// IGNORE
-	'flag' => '🏴󠁦󠁲󠁯󠁣󠁣󠁿',
 	'freshrss' => array(
 		'_' => 'FreshRSS',	// IGNORE
 		'about' => 'A prepaus de FreshRSS',
@@ -217,6 +216,11 @@ return array(
 		'weeks' => 'setmanas',
 		'years' => 'ans',
 	),
+	'readme' => array(
+		'contribute' => 'contribute',	// IGNORE
+		'language' => 'Language',	// IGNORE
+		'translated' => 'Progress',	// IGNORE
+	),
 	'share' => array(
 		'Known' => 'Sites basats sus Known',
 		'archiveIS' => 'archive.is',	// IGNORE

+ 5 - 1
app/i18n/pl/gen.php

@@ -136,7 +136,6 @@ return array(
 		'yesterday' => 'Wczorajsze',
 	),
 	'dir' => 'ltr',	// IGNORE
-	'flag' => '🇵🇱',
 	'freshrss' => array(
 		'_' => 'FreshRSS',	// IGNORE
 		'about' => 'O oprogramowaniu FreshRSS',
@@ -217,6 +216,11 @@ return array(
 		'weeks' => 'tygodnie',
 		'years' => 'lata',
 	),
+	'readme' => array(
+		'contribute' => 'contribute',	// IGNORE
+		'language' => 'Language',	// IGNORE
+		'translated' => 'Progress',	// IGNORE
+	),
 	'share' => array(
 		'Known' => 'Strony bazujące na usłudze Known',
 		'archiveIS' => 'archive.is',	// IGNORE

+ 5 - 1
app/i18n/pt-br/gen.php

@@ -136,7 +136,6 @@ return array(
 		'yesterday' => 'Ontem',
 	),
 	'dir' => 'ltr',	// IGNORE
-	'flag' => '🇧🇷',
 	'freshrss' => array(
 		'_' => 'FreshRSS',	// IGNORE
 		'about' => 'Sobre FreshRSS',
@@ -217,6 +216,11 @@ return array(
 		'weeks' => 'semanas',
 		'years' => 'anos',
 	),
+	'readme' => array(
+		'contribute' => 'contribute',	// IGNORE
+		'language' => 'Language',	// IGNORE
+		'translated' => 'Progress',	// IGNORE
+	),
 	'share' => array(
 		'Known' => 'Sites no Known',
 		'archiveIS' => 'archive.is',	// IGNORE

+ 5 - 1
app/i18n/pt-pt/gen.php

@@ -136,7 +136,6 @@ return array(
 		'yesterday' => 'Ontem',
 	),
 	'dir' => 'ltr',	// IGNORE
-	'flag' => '🇵🇹',
 	'freshrss' => array(
 		'_' => 'FreshRSS',	// IGNORE
 		'about' => 'Sobre FreshRSS',
@@ -217,6 +216,11 @@ return array(
 		'weeks' => 'semanas',
 		'years' => 'anos',
 	),
+	'readme' => array(
+		'contribute' => 'contribute',	// IGNORE
+		'language' => 'Language',	// IGNORE
+		'translated' => 'Progress',	// IGNORE
+	),
 	'share' => array(
 		'Known' => 'Sites no Known',
 		'archiveIS' => 'archive.is',	// IGNORE

+ 5 - 1
app/i18n/ru/gen.php

@@ -136,7 +136,6 @@ return array(
 		'yesterday' => 'Вчера',
 	),
 	'dir' => 'ltr',	// IGNORE
-	'flag' => '🇷🇺',
 	'freshrss' => array(
 		'_' => 'FreshRSS',	// IGNORE
 		'about' => 'О FreshRSS',
@@ -217,6 +216,11 @@ return array(
 		'weeks' => 'недель',
 		'years' => 'лет',
 	),
+	'readme' => array(
+		'contribute' => 'contribute',	// IGNORE
+		'language' => 'Language',	// IGNORE
+		'translated' => 'Progress',	// IGNORE
+	),
 	'share' => array(
 		'Known' => 'Сайты на Known',
 		'archiveIS' => 'archive.is',	// IGNORE

+ 5 - 1
app/i18n/sk/gen.php

@@ -136,7 +136,6 @@ return array(
 		'yesterday' => 'Včera',
 	),
 	'dir' => 'ltr',	// IGNORE
-	'flag' => '🇸🇰',
 	'freshrss' => array(
 		'_' => 'FreshRSS',	// IGNORE
 		'about' => 'O FreshRSS',
@@ -217,6 +216,11 @@ return array(
 		'weeks' => 'týždne',
 		'years' => 'roky',
 	),
+	'readme' => array(
+		'contribute' => 'contribute',	// IGNORE
+		'language' => 'Language',	// IGNORE
+		'translated' => 'Progress',	// IGNORE
+	),
 	'share' => array(
 		'Known' => 'Stránky založené na Known',
 		'archiveIS' => 'archive.is',	// IGNORE

+ 5 - 1
app/i18n/tr/gen.php

@@ -136,7 +136,6 @@ return array(
 		'yesterday' => 'Dün',
 	),
 	'dir' => 'ltr',	// IGNORE
-	'flag' => '🇹🇷',
 	'freshrss' => array(
 		'_' => 'FreshRSS',	// IGNORE
 		'about' => 'FreshRSS Hakkında',
@@ -217,6 +216,11 @@ return array(
 		'weeks' => 'hafta',
 		'years' => 'yıl',
 	),
+	'readme' => array(
+		'contribute' => 'contribute',	// IGNORE
+		'language' => 'Language',	// IGNORE
+		'translated' => 'Progress',	// IGNORE
+	),
 	'share' => array(
 		'Known' => 'Bilinen tabanlı siteler',
 		'archiveIS' => 'archive.is',	// IGNORE

+ 5 - 1
app/i18n/uk/gen.php

@@ -136,7 +136,6 @@ return array(
 		'yesterday' => 'Вчора',
 	),
 	'dir' => 'ltr',	// IGNORE
-	'flag' => '🇺🇦',
 	'freshrss' => array(
 		'_' => 'FreshRSS',	// IGNORE
 		'about' => 'Про FreshRSS',
@@ -217,6 +216,11 @@ return array(
 		'weeks' => 'тижд',
 		'years' => 'р.',
 	),
+	'readme' => array(
+		'contribute' => 'contribute',	// TODO
+		'language' => 'Language',	// TODO
+		'translated' => 'Progress',	// TODO
+	),
 	'share' => array(
 		'Known' => 'Сайти на Known',
 		'archiveIS' => 'archive.is',	// IGNORE

+ 5 - 1
app/i18n/zh-cn/gen.php

@@ -136,7 +136,6 @@ return array(
 		'yesterday' => '昨天',
 	),
 	'dir' => 'ltr',	// IGNORE
-	'flag' => '🇨🇳',
 	'freshrss' => array(
 		'_' => 'FreshRSS',	// IGNORE
 		'about' => '关于 FreshRSS',
@@ -217,6 +216,11 @@ return array(
 		'weeks' => '周',
 		'years' => '年',
 	),
+	'readme' => array(
+		'contribute' => 'contribute',	// IGNORE
+		'language' => 'Language',	// IGNORE
+		'translated' => 'Progress',	// IGNORE
+	),
 	'share' => array(
 		'Known' => '基于 Known 的站点',
 		'archiveIS' => 'archive.is',	// IGNORE

+ 5 - 1
app/i18n/zh-tw/gen.php

@@ -136,7 +136,6 @@ return array(
 		'yesterday' => '昨天',
 	),
 	'dir' => 'ltr',	// IGNORE
-	'flag' => '🇹🇼',
 	'freshrss' => array(
 		'_' => 'FreshRSS',	// IGNORE
 		'about' => '關於 FreshRSS',
@@ -217,6 +216,11 @@ return array(
 		'weeks' => '週',
 		'years' => '年',
 	),
+	'readme' => array(
+		'contribute' => 'contribute',	// IGNORE
+		'language' => 'Language',	// IGNORE
+		'translated' => 'Progress',	// IGNORE
+	),
 	'share' => array(
 		'Known' => '基於 Known 的站點',
 		'archiveIS' => 'archive.is',	// IGNORE

+ 2 - 2
cli/README.md

@@ -149,13 +149,13 @@ cd /usr/share/FreshRSS
 # -r, --revert revert the action (only used with ignore action).
 # -o, --origin-language selects the origin language (only used with add language action).
 
-./cli/check-translation.php [ ---display-result --help --language fr --display-report --generate-readme ]
+./cli/check.translation.php [ ---display-result --help --language fr --display-report --generate-readme ]
 # Check if translation files have missing keys or missing translations.
 # -d, --display-result display results of check.
 # -h, --help display help text and exit.
 # -l, --language set the language check.
 # -r, --display-report display completion report.
-# -g, --generate-readme generate readme for translation status.
+# -g, --generate-readme generate translation progress section in readme.
 ```
 
 ## Note about cron

+ 41 - 75
cli/check.translation.php

@@ -74,7 +74,22 @@ if ($cliOptions->displayReport) {
 	}
 }
 
-function writeToReadme(string $readmePath, string $markdownImgStr): void {
+function writeToReadme(string $readmePath, string $markdownTable): void {
+	$language = explode('.', $readmePath)[1];
+	// expecting `README.md` for `en` or `README.fr.md` for `fr`
+	if ($language === 'md') {
+		$language = 'en';
+	}
+	Minz_Translate::init($language);
+	$placeholders = [];
+	if (preg_match_all('/__.*?__/', $markdownTable, $placeholders) === false) {
+		echo 'Error: Fail while matching translation placeholders', PHP_EOL;
+		exit(1);
+	}
+	foreach (array_unique($placeholders[0]) as $_ => $placeholder) {
+		$markdownTable = str_replace($placeholder, _t('gen.readme.' . substr($placeholder, 2, -2)), $markdownTable);
+	}
+
 	$readme = file_get_contents($readmePath);
 	if ($readme === false) {
 		echo 'Error: Unable to open ' . $readmePath, PHP_EOL;
@@ -82,9 +97,9 @@ function writeToReadme(string $readmePath, string $markdownImgStr): void {
 	}
 	if (file_put_contents($readmePath, preg_replace('/<translations>(.*?)<\/translations>/s', <<<EOF
 	<translations>
-	<!-- This section is automatically generated by `cli/check.translation.php -g` -->
+	<!-- This section is automatically generated by `./cli/check.translation.php -g` -->
 
-	$markdownImgStr
+	$markdownTable
 
 	</translations>
 	EOF, $readme)) === false) {
@@ -94,90 +109,41 @@ function writeToReadme(string $readmePath, string $markdownImgStr): void {
 	echo 'Successfully written translation status into ' . $readmePath, PHP_EOL;
 }
 
-function embedSvg(string $contents): string {
-	return preg_replace(
-		'/<svg\s+(?:(?:[^>]*?)(xmlns=["\'][^"\']+["\']))?(?:(?:[^>]*?)(viewBox=["\'][^"\']+["\']))?(?:[^>]*?)>/i',
-		'<svg \1 \2 width="16" height="16" x="9" y="2">',
-		$contents
-	) ?? '';
-}
-
 if ($cliOptions->generateReadme) {
-	$supportedFormats = ['txt', 'svg'];
-	$flagsDir = dirname(__DIR__) . '/docs/i18n/flags';
+	$markdownTable = <<<EOF
+	| __language__ | __translated__ | |
+	| - | - | - |
+	EOF;
+	$markdownTable .= "\n";
 
-	$markdownImgStr = '';
 	foreach ($percentage as $lang => $value) {
 		$percentageInt = intval(rtrim($value, '%'));
-		$color = 'green';
-		if ($percentageInt < 90) {
-			$color = 'gold';
-		}
-		if ($percentageInt < 70) {
-			$color = 'darkred';
-		}
-		$svgFile = $flagsDir . '/' . $lang . '.svg';
-		$svg = '';
-		if (file_exists($svgFile)) {
-			$svg = file_get_contents($svgFile);
-			if ($svg === false) {
-				echo 'Error: Unable to open ' . $svgFile, PHP_EOL;
-				exit(1);
-			}
-		}
+		$completed = intval($percentageInt / 10);
+		$uncompleted = intval(ceil((100 - $percentageInt) / 10));
+		$progressBar = str_repeat('■', $completed) . str_repeat('・', $uncompleted);
 
 		$ghSearchUrl = 'https://github.com/search?q=' . urlencode("repo:FreshRSS/FreshRSS path:app/i18n/$lang /(TODO|DIRTY)$/");
-		$genPath = $flagsDir . '/gen/' . $lang . '.svg';
-		$template = '<!-- This file is automatically generated by `cli/check.translation.php -g` -->' . "\n";
-
-		if ($svg === '') {
-			$i18nGen = include dirname(__DIR__) . "/app/i18n/$lang/gen.php";
-			if (!is_array($i18nGen) || !is_string($i18nGen['flag'] ?? null)) {
-				echo 'Error: No Unicode flag found for language ' . $lang, PHP_EOL;
-				exit(1);
-			}
-			$unicodeFlag = $i18nGen['flag'];
-			if ($lang !== 'en' && $unicodeFlag === '🇬🇧') {
-				echo 'Error: Wrong Unicode flag for language ' . $lang, PHP_EOL;
-				exit(1);
-			}
-			$value = $unicodeFlag . ' ' . $percentageInt . '%';
-			$template .= <<<EOF
-			<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
-				<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
-					<rect rx="3" width="70" height="20" fill="$color" />
-					<text x="34" y="14">$value</text>
-				</g>
-			</svg>
-			EOF;
-		} else {
-			// An SVG file is available to override the Unicode flag
-			$value = $percentageInt . '%';
-			$contents = embedSvg($svg);
-			$template .= <<<EOF
-			<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
-				<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
-					<rect rx="3" width="70" height="20" fill="$color" />
-					<!-- embedded SVG -->
-					$contents
-					<!-- end of embedded SVG -->
-					<text x="43" y="14">$value</text>
-				</g>
-			</svg>
-			EOF;
-		}
-		if (file_put_contents($genPath, $template) === false) {
-			echo 'Error: Fail while writing to ' . $genPath, PHP_EOL;
-			exit(1);
+
+		// BCP 47 / ISO 3166: Uppercase the last (region) subtag if any (e.g. pt-pt -> pt-PT)
+		$bcp47 = $lang;
+		if (str_contains($bcp47, '-')) {
+			$parts = explode('-', $bcp47);
+			$parts[count($parts) - 1] = strtoupper($parts[count($parts) - 1]);
+			$bcp47 = implode('-', $parts);
 		}
-		$markdownImgStr .= "[![$lang](./docs/i18n/flags/gen/$lang.svg)]($ghSearchUrl) ";
+
+		$markdownTable .= '| ' . implode(' | ', [
+			_t('gen.lang.' . $lang) . " ($bcp47)",
+			$progressBar . ' ' . $percentageInt . '%',
+			"[__contribute__]($ghSearchUrl)",
+		]) . " |\n";
 	}
 	// In case we're located in ./cli/
 	if (!file_exists('constants.php')) {
 		chdir('..');
 	}
 	foreach (array_merge(['README.md'], glob('README.*.md') ?: []) as $readmePath) {
-		writeToReadme($readmePath, rtrim($markdownImgStr));
+		writeToReadme($readmePath, rtrim($markdownTable));
 	}
 	exit();
 }
@@ -233,7 +199,7 @@ DESCRIPTION
 	-h, --help		display this help and exit.
 	-l, --language=LANG	filter by LANG.
 	-r, --display-report	display completion report.
-	-g, --generate-readme	generate readme for translation status.
+	-g, --generate-readme	generate translation progress section in readme.
 
 HELP;
 	exit();

+ 0 - 5
docs/i18n/flags/README.md

@@ -1,5 +0,0 @@
-Used by [check.translation.php](../../../cli/check.translation.php)
-
-See also the translation key `gen.flag` for Unicode flags.
-
-Put an SVG here when the Unicode flag does not exist or does not have sufficient implementation support.

+ 0 - 7
docs/i18n/flags/gen/cs.svg

@@ -1,7 +0,0 @@
-<!-- This file is automatically generated by `cli/check.translation.php -g` -->
-<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
-	<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
-		<rect rx="3" width="70" height="20" fill="gold" />
-		<text x="34" y="14">🇨🇿 88%</text>
-	</g>
-</svg>

+ 0 - 7
docs/i18n/flags/gen/de.svg

@@ -1,7 +0,0 @@
-<!-- This file is automatically generated by `cli/check.translation.php -g` -->
-<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
-	<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
-		<rect rx="3" width="70" height="20" fill="green" />
-		<text x="34" y="14">🇩🇪 99%</text>
-	</g>
-</svg>

+ 0 - 7
docs/i18n/flags/gen/el.svg

@@ -1,7 +0,0 @@
-<!-- This file is automatically generated by `cli/check.translation.php -g` -->
-<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
-	<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
-		<rect rx="3" width="70" height="20" fill="darkred" />
-		<text x="34" y="14">🇬🇷 22%</text>
-	</g>
-</svg>

+ 0 - 7
docs/i18n/flags/gen/en-us.svg

@@ -1,7 +0,0 @@
-<!-- This file is automatically generated by `cli/check.translation.php -g` -->
-<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
-	<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
-		<rect rx="3" width="70" height="20" fill="green" />
-		<text x="34" y="14">🇺🇸 99%</text>
-	</g>
-</svg>

+ 0 - 7
docs/i18n/flags/gen/en.svg

@@ -1,7 +0,0 @@
-<!-- This file is automatically generated by `cli/check.translation.php -g` -->
-<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
-	<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
-		<rect rx="3" width="70" height="20" fill="green" />
-		<text x="34" y="14">🇬🇧 100%</text>
-	</g>
-</svg>

+ 0 - 7
docs/i18n/flags/gen/es.svg

@@ -1,7 +0,0 @@
-<!-- This file is automatically generated by `cli/check.translation.php -g` -->
-<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
-	<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
-		<rect rx="3" width="70" height="20" fill="green" />
-		<text x="34" y="14">🇪🇸 91%</text>
-	</g>
-</svg>

+ 0 - 7
docs/i18n/flags/gen/fa.svg

@@ -1,7 +0,0 @@
-<!-- This file is automatically generated by `cli/check.translation.php -g` -->
-<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
-	<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
-		<rect rx="3" width="70" height="20" fill="green" />
-		<text x="34" y="14">🇮🇷 97%</text>
-	</g>
-</svg>

+ 0 - 7
docs/i18n/flags/gen/fi.svg

@@ -1,7 +0,0 @@
-<!-- This file is automatically generated by `cli/check.translation.php -g` -->
-<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
-	<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
-		<rect rx="3" width="70" height="20" fill="green" />
-		<text x="34" y="14">🇫🇮 92%</text>
-	</g>
-</svg>

+ 0 - 7
docs/i18n/flags/gen/fr.svg

@@ -1,7 +0,0 @@
-<!-- This file is automatically generated by `cli/check.translation.php -g` -->
-<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
-	<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
-		<rect rx="3" width="70" height="20" fill="green" />
-		<text x="34" y="14">🇫🇷 100%</text>
-	</g>
-</svg>

+ 0 - 7
docs/i18n/flags/gen/he.svg

@@ -1,7 +0,0 @@
-<!-- This file is automatically generated by `cli/check.translation.php -g` -->
-<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
-	<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
-		<rect rx="3" width="70" height="20" fill="darkred" />
-		<text x="34" y="14">🇮🇱 45%</text>
-	</g>
-</svg>

+ 0 - 7
docs/i18n/flags/gen/hu.svg

@@ -1,7 +0,0 @@
-<!-- This file is automatically generated by `cli/check.translation.php -g` -->
-<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
-	<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
-		<rect rx="3" width="70" height="20" fill="green" />
-		<text x="34" y="14">🇭🇺 99%</text>
-	</g>
-</svg>

+ 0 - 7
docs/i18n/flags/gen/id.svg

@@ -1,7 +0,0 @@
-<!-- This file is automatically generated by `cli/check.translation.php -g` -->
-<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
-	<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
-		<rect rx="3" width="70" height="20" fill="green" />
-		<text x="34" y="14">🇮🇩 97%</text>
-	</g>
-</svg>

+ 0 - 7
docs/i18n/flags/gen/it.svg

@@ -1,7 +0,0 @@
-<!-- This file is automatically generated by `cli/check.translation.php -g` -->
-<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
-	<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
-		<rect rx="3" width="70" height="20" fill="green" />
-		<text x="34" y="14">🇮🇹 96%</text>
-	</g>
-</svg>

+ 0 - 7
docs/i18n/flags/gen/ja.svg

@@ -1,7 +0,0 @@
-<!-- This file is automatically generated by `cli/check.translation.php -g` -->
-<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
-	<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
-		<rect rx="3" width="70" height="20" fill="green" />
-		<text x="34" y="14">🇯🇵 95%</text>
-	</g>
-</svg>

+ 0 - 7
docs/i18n/flags/gen/ko.svg

@@ -1,7 +0,0 @@
-<!-- This file is automatically generated by `cli/check.translation.php -g` -->
-<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
-	<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
-		<rect rx="3" width="70" height="20" fill="gold" />
-		<text x="34" y="14">🇰🇷 88%</text>
-	</g>
-</svg>

+ 0 - 7
docs/i18n/flags/gen/lv.svg

@@ -1,7 +0,0 @@
-<!-- This file is automatically generated by `cli/check.translation.php -g` -->
-<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
-	<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
-		<rect rx="3" width="70" height="20" fill="gold" />
-		<text x="34" y="14">🇱🇻 82%</text>
-	</g>
-</svg>

+ 0 - 7
docs/i18n/flags/gen/nl.svg

@@ -1,7 +0,0 @@
-<!-- This file is automatically generated by `cli/check.translation.php -g` -->
-<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
-	<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
-		<rect rx="3" width="70" height="20" fill="green" />
-		<text x="34" y="14">🇳🇱 99%</text>
-	</g>
-</svg>

Разлика између датотеке није приказан због своје велике величине
+ 0 - 5
docs/i18n/flags/gen/oc.svg


+ 0 - 7
docs/i18n/flags/gen/pl.svg

@@ -1,7 +0,0 @@
-<!-- This file is automatically generated by `cli/check.translation.php -g` -->
-<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
-	<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
-		<rect rx="3" width="70" height="20" fill="green" />
-		<text x="34" y="14">🇵🇱 100%</text>
-	</g>
-</svg>

+ 0 - 7
docs/i18n/flags/gen/pt-br.svg

@@ -1,7 +0,0 @@
-<!-- This file is automatically generated by `cli/check.translation.php -g` -->
-<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
-	<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
-		<rect rx="3" width="70" height="20" fill="gold" />
-		<text x="34" y="14">🇧🇷 88%</text>
-	</g>
-</svg>

+ 0 - 7
docs/i18n/flags/gen/pt-pt.svg

@@ -1,7 +0,0 @@
-<!-- This file is automatically generated by `cli/check.translation.php -g` -->
-<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
-	<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
-		<rect rx="3" width="70" height="20" fill="gold" />
-		<text x="34" y="14">🇵🇹 88%</text>
-	</g>
-</svg>

+ 0 - 7
docs/i18n/flags/gen/ru.svg

@@ -1,7 +0,0 @@
-<!-- This file is automatically generated by `cli/check.translation.php -g` -->
-<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
-	<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
-		<rect rx="3" width="70" height="20" fill="gold" />
-		<text x="34" y="14">🇷🇺 88%</text>
-	</g>
-</svg>

+ 0 - 7
docs/i18n/flags/gen/sk.svg

@@ -1,7 +0,0 @@
-<!-- This file is automatically generated by `cli/check.translation.php -g` -->
-<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
-	<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
-		<rect rx="3" width="70" height="20" fill="gold" />
-		<text x="34" y="14">🇸🇰 88%</text>
-	</g>
-</svg>

+ 0 - 7
docs/i18n/flags/gen/tr.svg

@@ -1,7 +0,0 @@
-<!-- This file is automatically generated by `cli/check.translation.php -g` -->
-<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
-	<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
-		<rect rx="3" width="70" height="20" fill="green" />
-		<text x="34" y="14">🇹🇷 96%</text>
-	</g>
-</svg>

+ 0 - 7
docs/i18n/flags/gen/uk.svg

@@ -1,7 +0,0 @@
-<!-- This file is automatically generated by `cli/check.translation.php -g` -->
-<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
-	<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
-		<rect rx="3" width="70" height="20" fill="green" />
-		<text x="34" y="14">🇺🇦 99%</text>
-	</g>
-</svg>

+ 0 - 7
docs/i18n/flags/gen/zh-cn.svg

@@ -1,7 +0,0 @@
-<!-- This file is automatically generated by `cli/check.translation.php -g` -->
-<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
-	<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
-		<rect rx="3" width="70" height="20" fill="green" />
-		<text x="34" y="14">🇨🇳 90%</text>
-	</g>
-</svg>

+ 0 - 7
docs/i18n/flags/gen/zh-tw.svg

@@ -1,7 +0,0 @@
-<!-- This file is automatically generated by `cli/check.translation.php -g` -->
-<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
-	<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
-		<rect rx="3" width="70" height="20" fill="gold" />
-		<text x="34" y="14">🇹🇼 88%</text>
-	</g>
-</svg>

Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
docs/i18n/flags/oc.svg


Неке датотеке нису приказане због велике количине промена