Translation Validator Tool & Plural Rules

Having a question about translating phpBB 3.1? Want to discuss and collaborate with people currently translating phpBB 3.1? Here would be the correct place to do so.
Locked
GunChleoc
Registered User
Posts: 152
Joined: Tue Jun 16, 2009 7:48 am

Translation Validator Tool & Plural Rules

Post by GunChleoc »

The rules for translating plural forms are documented on: https://wiki.phpbb.com/Plural_Rules

And this tool can help to find bugs in your translations:
nickvergessen wrote:If you want to check your translation locally, before submitting and publishing it, here are some simple steps to do so.

Validating Language packages:
  1. Download the attachment:
    phpbb-translation-validator-1.3.9.zip
    (652.4 KiB) Downloaded 233 times
  2. Unzip the file and put the vendor/ folder into the following structure:

    Code: Select all

    3.0/de/language/de/common.php (all files from the package should be in 3.0/de/ )
    3.0/de/styles/prosilver/imageset/de/imageset.cfg
    3.0/en/language/en/common.php (all files from the package should be in 3.0/en/ )
    3.0/en/styles/prosilver/imageset/en/imageset.cfg
    vendor/
    
  3. Open a console/terminal in the parent folder of vendor/
    Windows:
    1. Copy the folder path from your parent folder
    2. Press Windows-key
    3. Type: cmd
    4. Run: cd LINK-TO-THE-FOLDER-FROM-STEP-1.1
  4. List the help of the tool: vendor\bin\PhpbbTranslationValidator.php.bat validate --help
  5. Example to validate the german translation for 3.0:

    Code: Select all

    vendor\bin\PhpbbTranslationValidator.php.bat validate de --phpbb-version=3.0
    If you want to display Notice errors aswell append --display-notices:

    Code: Select all

    vendor\bin\PhpbbTranslationValidator.php.bat validate de --phpbb-version=3.0 --display-notices
    The output should be something like:

    Code: Select all

    E:\Develop\translations\Test>vendor\bin\PhpbbTranslationValidator.php.bat valida
    te de --phpbb-version=3.0
    Running Language Pack Validator on language de.
    
    N...E.W.......W.........WNNNNNNNNNNN.NNNNNNNNNNNNNNNNNNNNNN.FE.F 64 / 76 ( 84%)
    ..E.....E....
    
    Test results for language pack:
    
    
    Validation: FAILED
    Fatal: 2, Error: 12, Warning: 24, Notice: 81
    
    
     Fatal in language/de/help_bbcode.php:16.1:
    String is using additional html: <img src="http://www.google.com/intl/de_de/imag
    es/logo.gif" alt="" />
    
     Fatal in language/de/install.php:INSTALL_CONGRATS_EXPLAIN:
    String is missing closing tag for html: p
    
     Error in language/de/acp/board.php:DEFAULT_DATE_FORMAT_EXPLAIN:
    String is using additional html: <a href="http://www.php.net/date">
    
     Error in language/de/acp/board.php:ACP_JABBER_SETTINGS_EXPLAIN:
    String is using additional html: <a href="http://de.wikipedia.org/wiki/Jabber">
    
     Error in language/de/help_faq.php:6.1:
    String is using additional html: <a href="faq.php#f07">
    
     Error in language/de/memberlist.php:USER_LAST_REMINDED.2:
    Key was not validated: 2
    
     Error in language/de/ucp.php:TERMS_OF_USE_CONTENT:
    Should have 2 string arguments, but has 1
    
     Error in language/de/ucp.php:TERMS_OF_USE_CONTENT:
    String is using additional html: <h3>
    
     Error in language/de/ucp.php:TERMS_OF_USE_CONTENT:
    String is using additional html: <ol style="list-style-type: lower-alpha">
    
     Error in language/de/ucp.php:TERMS_OF_USE_CONTENT:
    String is using additional html: <li>
    
     Error in language/de/ucp.php:PRIVACY_POLICY:
    Should have 2 string arguments, but has 1
    
     Error in language/de/ucp.php:PRIVACY_POLICY:
    String is using additional html: <h3>
    
     Error in language/de/ucp.php:PRIVACY_POLICY:
    String is using additional html: <ol style="list-style-type: decimal;">
    
     Error in language/de/ucp.php:PRIVACY_POLICY:
    String is using additional html: <li>
    
     Warning in language/de/acp/common.php:WRITABLE_CONFIG:
    String is using additional html: <a href="http://de.wikipedia.org/wiki/Chmod" re
    l="external">
    
     Warning in language/de/acp/permissions.php:ACP_PERMISSIONS_EXPLAIN:
    String is using additional html: <a href="https://www.phpbb.de/go/3/berechtigung
    en">
    
     Warning in language/de/common.php:TRANSLATION_INFO:
    String is using additional html: <a href="https://www.phpbb.de/">
    
     Warning in language/de/common.php:VIEW_ONLINE_TIME:
    Should have 1 integer arguments, but has 0
    
     Warning in language/de/help_bbcode.php:14.1:
    String is using additional html: <a href="https://www.phpbb.de/">
    
     Warning in language/de/help_bbcode.php:14.1:
    String is using additional html: <a href="mailto:[email protected]">
    
     Warning in language/de/help_bbcode.php:16.1:
    String is using additional html: <a href="http://www.google.de/">
    
     Warning in language/de/help_faq.php:74.1:
    String is using additional html: <a href="https://www.phpbb.de/">
    
     Warning in language/de/install.php:CONVERT_COMPLETE_EXPLAIN:
    String is using additional html: <a href="https://www.phpbb.de/go/3/dokumentatio
    n">
    
     Warning in language/de/install.php:CONVERT_COMPLETE_EXPLAIN:
    String is using additional html: <a href="https://www.phpbb.de/go/3/supportforum
    ">
    
     Warning in language/de/install.php:INSTALL_CONGRATS_EXPLAIN:
    String is using additional html: <a href="https://www.phpbb.de/go/3/dokumentatio
    n">
    
     Warning in language/de/install.php:INSTALL_CONGRATS_EXPLAIN:
    String is using additional html: <a href="https://www.phpbb.de/go/3/supportforum
    ">
    
     Warning in language/de/install.php:MYSQL_SCHEMA_UPDATE_REQUIRED:
    String is using additional html: <a href="https://www.phpbb.de/go/3/no_default">
    
    
     Warning in language/de/install.php:MYSQL_SCHEMA_UPDATE_REQUIRED:
    String is using additional html: <a href="https://www.phpbb.de/go/3/supportforum
    ">
    
     Warning in language/de/install.php:SUPPORT_BODY:
    String is using additional html: <a href="https://www.phpbb.de/go/3/konvertierun
    g">
    
     Warning in language/de/install.php:SUPPORT_BODY:
    String is using additional html: <a href="https://www.phpbb.de/go/3/mods">
    
     Warning in language/de/install.php:SUPPORT_BODY:
    String is using additional html: <a href="https://www.phpbb.de/go/3/styles">
    
     Warning in language/de/install.php:SUPPORT_BODY:
    String is using additional html: <a href="https://www.phpbb.de/go/3/ersteschritt
    e">
    
     Warning in language/de/install.php:SUPPORT_BODY:
    String is using additional html: <a href="https://www.phpbb.de/go/3/support">
    
     Warning in language/de/install.php:SUPPORT_BODY:
    String is using additional html: <a href="https://www.phpbb.de/go/3/schnellstart
    ">
    
     Warning in language/de/install.php:SUPPORT_BODY:
    String is using additional html: <a href="https://www.phpbb.de/go/newsletter">
    
     Warning in language/de/install.php:NO_UPDATE_FILES_OUTDATED:
    String is using additional html: <a href="https://www.phpbb.de/go/3/downloads" r
    el="external">
    
     Warning in language/de/install.php:UPDATE_INSTRUCTIONS:
    String is using additional html: <a href="https://www.phpbb.de/go/3/downloads">
    
     Warning in language/de/memberlist.php:USER_LAST_REMINDED:
    Array has additional key: 2
    
    
    
    Validation: FAILED
    Fatal: 2, Error: 12, Warning: 24, Notice: 81
    
    E:\Develop\translations\Test>
Note:
Feel free to test it and report strange behaviour/bugs to https://github.com/phpbb/phpbb-translat ... tor/issues
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Translation Validator Tool & Plural Rules

Post by 3Di »

Supports also phpBB 3.2, the repository:

https://github.com/phpbb/phpbb-translation-validator
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
Locked

Return to “[3.1.x] Translations”