X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=scripts%2Fupdate_po_templates.php;h=af9ed8d208aab46b00309d1097522899cd4e430a;hb=3e8af172d636cc7ca3a9e2301b928f6ca79b9eb2;hp=f882f673a4d9d00025dcfe0154c7068ce60142c8;hpb=519e1e6250d995aad0b7705ca46dec989e8d8e8c;p=quix0rs-gnu-social.git diff --git a/scripts/update_po_templates.php b/scripts/update_po_templates.php index f882f673a4..af9ed8d208 100755 --- a/scripts/update_po_templates.php +++ b/scripts/update_po_templates.php @@ -34,9 +34,13 @@ function update_core($dir, $domain) xgettext \ --from-code=UTF-8 \ --default-domain=$domain \ - --output=locale/$domain.po \ + --output=locale/$domain.pot \ --language=PHP \ - --keyword="_m:1" \ + --add-comments=TRANS \ + --keyword="_m:1,1t" \ + --keyword="_m:1c,2,2t" \ + --keyword="_m:1,2,3t" \ + --keyword="_m:1c,2,3,4t" \ --keyword="pgettext:1c,2" \ --keyword="npgettext:1c,2,3" \ actions/*.php \ @@ -60,10 +64,14 @@ function do_update_plugin($dir, $domain) xgettext \ --from-code=UTF-8 \ --default-domain=$domain \ - --output=locale/$domain.po \ + --output=locale/$domain.pot \ --language=PHP \ + --add-comments=TRANS \ --keyword='' \ - --keyword="_m:1" \ + --keyword="_m:1,1t" \ + --keyword="_m:1c,2,2t" \ + --keyword="_m:1,2,3t" \ + --keyword="_m:1c,2,3,4t" \ END; foreach ($files as $file) { @@ -186,6 +194,9 @@ foreach ($args as $arg) { $allplugins = true; } elseif (substr($arg, 0, 9) == "--plugin=") { $plugins[] = substr($arg, 9); + } elseif ($arg == '--help') { + echo "options: --all --core --plugins --plugin=Foo\n\n"; + exit(0); } }