Many no longer used strings still available in the translation interface

navazkanavazka Join Date: 2015-12-08 Member: 209825Members
The translation system contains many strings which are either obviously duplicated (triplicated, etc, with minor wording changes), or are very likely to be no longer used in the current version of the game.

Example of a duplicated string:
TIPVIDEO_1_EXO_EXOSUIT_RAIL_GUNS (Hold Right-Click to charge the Rail Gun. The shot can pierce targets.)
TIPVIDEO_1_EXO_RAIL_GUNS (Hold Right-Click to charge the Rail Gun, the shot can pierce targets.)
TIPVIDEO_1_EXOSUIT_RAIL_GUN (Hold Right-Click to charge the Rail Gun, the shot can perice targets.)

By grepping the ns2/lua directory, only TIPVIDEO_1_EXO_EXOSUIT_RAIL_GUNS exists, other strings do not. There are tens of duplicated strings out there similar to this example.

Example of an obviously outdated string:
EVT_SHADOWSTEP_RESEARCHED (SHADOWSTEP RESEARCHED)
TIPVIDEO_2_FADE_FADE_SHADOW_STEP (Press Shift to Shadow Step. You can use it with a direction key to dodge quickly.) 
EVT_BABBLERS_RESEARCHED (BABBLERS RESEARCHED) 

Shadow step is no more and babblers now don't require research, unless I'm mistaken. None of the strings can be found in the ns2/lua directory.

The problem is that these strings waste time of the translators, who can hardly distinguish which strings are real and which are no longer being used, and therefore need to translate everything. That makes it take longer, makes translation process look a more daunting task (more strings to translate), and most importantly makes translation maintenance much harder (if you decide to change how a particular term is translated - and that happens a lot, at least in my language - you need to go through all available strings and modify them).

My current estimate is that 10-15% of available strings are these superfluous remnants of the past. Developers, could you please trim those, so that they get removed from the translation system? If it helps, I can provide an exact list, if grepping in lua files is sufficient.

This would definitely make the translation process easier. Thanks a lot.

(And if you actually made this not a one-time fix, but a future-proof fix, by automatically pruning old strings when uploading new data to the translation system, you'd earn an endless translators' gratitude :smile:).

Comments

  • YojimboYojimbo England Join Date: 2009-03-19 Member: 66806Members, NS2 Playtester, NS2 Map Tester, Reinforced - Supporter, Reinforced - Silver, Reinforced - Shadow
    navazka wrote: »
    The translation system contains many strings which are either obviously duplicated (triplicated, etc, with minor wording changes), or are very likely to be no longer used in the current version of the game.

    Example of a duplicated string:
    TIPVIDEO_1_EXO_EXOSUIT_RAIL_GUNS (Hold Right-Click to charge the Rail Gun. The shot can pierce targets.)
    TIPVIDEO_1_EXO_RAIL_GUNS (Hold Right-Click to charge the Rail Gun, the shot can pierce targets.)
    TIPVIDEO_1_EXOSUIT_RAIL_GUN (Hold Right-Click to charge the Rail Gun, the shot can perice targets.)
    

    By grepping the ns2/lua directory, only TIPVIDEO_1_EXO_EXOSUIT_RAIL_GUNS exists, other strings do not. There are tens of duplicated strings out there similar to this example.

    Example of an obviously outdated string:
    EVT_SHADOWSTEP_RESEARCHED (SHADOWSTEP RESEARCHED)
    TIPVIDEO_2_FADE_FADE_SHADOW_STEP (Press Shift to Shadow Step. You can use it with a direction key to dodge quickly.) 
    EVT_BABBLERS_RESEARCHED (BABBLERS RESEARCHED) 
    

    Shadow step is no more and babblers now don't require research, unless I'm mistaken. None of the strings can be found in the ns2/lua directory.

    The problem is that these strings waste time of the translators, who can hardly distinguish which strings are real and which are no longer being used, and therefore need to translate everything. That makes it take longer, makes translation process look a more daunting task (more strings to translate), and most importantly makes translation maintenance much harder (if you decide to change how a particular term is translated - and that happens a lot, at least in my language - you need to go through all available strings and modify them).

    My current estimate is that 10-15% of available strings are these superfluous remnants of the past. Developers, could you please trim those, so that they get removed from the translation system? If it helps, I can provide an exact list, if grepping in lua files is sufficient.

    This would definitely make the translation process easier. Thanks a lot.

    (And if you actually made this not a one-time fix, but a future-proof fix, by automatically pruning old strings when uploading new data to the translation system, you'd earn an endless translators' gratitude :smile:).

    I love this guy
  • navazkanavazka Join Date: 2015-12-08 Member: 209825Members
    edited April 2016
    I created a simple script to count how many translatable strings I can't find in the lua directory. It's worse than I thought, it's 515 out of 1819 strings (28%). But I don't know how really NS2 works internally, so maybe some strings are used from a different location than the lua directory.

    Here are the scripts. Only executable on Linux and probably Mac, but now that bash is available on Windows 10 (second link), you can probably run it from Windows as well. To be executed from Steam/SteamApps/common/Natural Selection 2/ns2/gamestrings directory.

    Total number to translatable strings:
    $ wc -l enUS.txt 
    1819 enUS.txt
    

    The print_missing.sh script:
    #!/bin/bash
    set -e
    
    while IFS='' read -r line; do
        keyword=$(echo "$line" | cut -d' ' -f1)
        if ! grep -q -r "[\"\']$keyword[\"\']" ../lua; then
            echo "$keyword"
        fi
    done < "enUS.txt"
    

    Total number of translatable strings which are not found in the lua directory:
    $ ./print_missing.sh | wc -l
    515
    
    (If you want to print their names instead of counting them, just remove | wc -l part.)

    Edit: updated to include quotes/apostrophes around searched strings.
  • YojimboYojimbo England Join Date: 2009-03-19 Member: 66806Members, NS2 Playtester, NS2 Map Tester, Reinforced - Supporter, Reinforced - Silver, Reinforced - Shadow
    navazka wrote: »
    I created a simple script to count how many translatable strings I can't find in the lua directory. It's worse than I thought, it's 502 out of 1819 strings (28%). But I don't know how really NS2 works internally, so maybe some strings are used from a different location than the lua directory.

    Here are the scripts. Only executable on Linux and probably Mac, but now that bash is available on Windows 10 (second link), you can probably run it from Windows as well. To be executed from Steam/SteamApps/common/Natural Selection 2/ns2/gamestrings directory.

    Total number to translatable strings:
    $ wc -l enUS.txt 
    1819 enUS.txt
    

    The print_missing.sh script:
    #!/bin/bash
    set -e
    
    while IFS='' read -r line; do
        keyword=$(echo "$line" | cut -d' ' -f1)
        if ! grep -q -r -F "$keyword" ../lua; then
            echo "$keyword"
        fi
    done < "enUS.txt"
    

    Total number of translatable strings which are not found in the lua directory:
    $ ./print_missing.sh | wc -l
    502
    
    (If you want to print their names instead of counting them, just remove | wc -l part.)

    Are you gaiz seeing this? @remi @GhoulofGSG9 @McGlaspie

    Quick, give him a bomb to defuse before he finds more things wrong with NS2!
  • navazkanavazka Join Date: 2015-12-08 Member: 209825Members
    Yojimbo wrote: »
    Quick, give him a bomb to defuse before he finds more things wrong with NS2!

    Sorry, I make my living as a software QA, I think it left a mark on me ;-)

  • YojimboYojimbo England Join Date: 2009-03-19 Member: 66806Members, NS2 Playtester, NS2 Map Tester, Reinforced - Supporter, Reinforced - Silver, Reinforced - Shadow
    navazka wrote: »
    Yojimbo wrote: »
    Quick, give him a bomb to defuse before he finds more things wrong with NS2!

    Sorry, I make my living as a software QA, I think it left a mark on me ;-)

    Anything else you can dig up mate? lol
  • navazkanavazka Join Date: 2015-12-08 Member: 209825Members
    I have spotted a few fishy things related to the translation system, but there's no point in spending considerable time debugging and reporting them, if nobody looks eager to fix it. If things get fixed (or at least acknowledged and filed into an internal ticketing system, or something), I'll report more.
  • GhoulofGSG9GhoulofGSG9 Join Date: 2013-03-31 Member: 184566Members, Super Administrators, Forum Admins, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, Reinforced - Supporter, WC 2013 - Supporter, Pistachionauts
    edited April 2016
    navazka wrote: »
    I have spotted a few fishy things related to the translation system, but there's no point in spending considerable time debugging and reporting them, if nobody looks eager to fix it. If things get fixed (or at least acknowledged and filed into an internal ticketing system, or something), I'll report more.

    As much as i hate to say it but we sadly currently don't have the time or resources to work on the translation website.

    Even though we are all aware of all the annoying issues the currently used website has. Otherwise i guess we would move ns2 to the newer translation website of UWE that is used for Subnautica.
  • navazkanavazka Join Date: 2015-12-08 Member: 209825Members
    As much as i hate to say it but we sadly currently don't have the time or resources to work on the translation website.
    That's sad, but I completely understand (I also work on software). However, please consider at least removing the no-longer-used strings from the translation system, it's really making translations harder. That's not a software change, but just a data content adjustment, and hopefully could be not that hard (see my scripts above). Thanks!
  • navazkanavazka Join Date: 2015-12-08 Member: 209825Members
    From build 295 release notes:
    Removed over 200 no longer used game strings to help our community translators.

    Great! It's fewer than I counted, but maybe I was wrong about some of them. Definitely appreciated, thanks.
Sign In or Register to comment.