translate scripts

124»

Comments

  • item:addKeyValue('Drop distance', '1.2u')

    ->

    item:addKeyValue(_('Drop distance'), '1.2u')

    Or

    item:addKeyValue(_('database:mine', 'Drop distance'), '1.2u')

    The first bit is a "context marker" does not show up anywhere ingame, but gives the system a way to see differences between the same text in different contexts.

    No need to translate the number. And no need for format in this case

  • edited November 2020

    Thanks Daid

    I thought that the line number into fr.po was used for the software to know on which line to translate. As I understand it, this is just a comment to help. :-)


    a. That gives that below. It works well but is it clean (numbers) as a handwriting?

    #: scripts/science_db.lua:36 46 55

    msgid "Blast radius"

    msgstr "Rayon d'action"


    #: scripts/science_db.lua:31 62

    msgid "Damage"

    msgstr "Degats"

    ....



    b. Otherwise I try to add "each" below, I tried several things but it crash or doesn't translate. If that's not possible that's okay, it's just a word.

    into science_db.lua :

    item:addKeyValue('Damage', '6 each, 30 total')

    ->

    item:addKeyValue(_('Damage'), ('6 each, 30 total')) ---> No crash but translation "6 chacune, total 30" doesn't work


    with Into fr.po

    #: scripts/science_db.lua:62

    msgid "6 each, 30 total"

    msgstr "6 chacune, total 30"

  • To translate the communication files, can I modify comms_station.lua, comms_ship.lua, comms_supply_drop.lua myself or is it too hard for me?

    See the examples to translate below


    --> setCommsMessage("You need to stay docked for that action.")



    -->  addCommsReply(

          "Can you send a supply drop? (" .. getServiceCost("supplydrop") .. "rep)",



    --> local taunt_success_reply = "Your bloodline will end here!"

        local taunt_failed_reply = "Your feeble threats are meaningless."

        if faction == "Kraylor" then

          setCommsMessage("Ktzzzsss.\nYou will DIEEee weaklingsss!")

        elseif faction == "Arlenians" then

          setCommsMessage("We wish you no harm, but will harm you if we must.\nEnd of transmission.")

  • Daid,

    Regarding the translation of fr.po, I continued to work on it. So, should I update the Pull request which has been waiting for validation for a week or should I wait and make a new Pull Request when you have validated the other to avoid too many modifications to check, as you suggested to me?

    Thanks

Sign In or Register to comment.