Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

translationtool crashes when there are no plural form #686

Open
StCyr opened this issue Nov 21, 2024 · 0 comments
Open

translationtool crashes when there are no plural form #686

StCyr opened this issue Nov 21, 2024 · 0 comments
Labels

Comments

@StCyr
Copy link

StCyr commented Nov 21, 2024

when there are no plural form in an app, "translationtool.phar create-pot-file" doesn't add the "Plural-Forms: nplurals=..." header line.

That make the command "translationtool.phar convert-po-files" crash:

root@2408LC07E43:/var/www/nc29/apps/signlive# ./translationtool.phar convert-po-files
Those files are ignored:
Array
(
    [0] => js/
)
PHP Fatal error:  Uncaught TypeError: TranslatableApp::writeJsFile(): Argument #2 ($plurals) must be of type string, null given, called in phar:///var/www/nc29/apps/signlive/translationtool.phar/translationtool.php on line 179 and defined in phar:///var/www/nc29/apps/signlive/translationtool.phar/translationtool.php:184
Stack trace:
#0 phar:///var/www/nc29/apps/signlive/translationtool.phar/translationtool.php(179): TranslatableApp->writeJsFile()
#1 phar:///var/www/nc29/apps/signlive/translationtool.phar/translationtool.php(558): TranslatableApp->createNextcloudFiles()
#2 phar:///var/www/nc29/apps/signlive/translationtool.phar/translationtool.php(688): TranslationTool->convertPoFiles()
#3 /var/www/nc29/apps/signlive/translationtool.phar(12): require('...')
#4 {main}
  thrown in phar:///var/www/nc29/apps/signlive/translationtool.phar/translationtool.php on line 184

Steps to reproduce

  1. Have an application without any plural form defined.
  2. translationtool.phar create-pot-file
  3. translationtool.phar convert-po-files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants