translate scripts

13

Comments

  • edited March 2020

    What about io (in SeriousProton)?

    I'm not sure I can build SeriousProton

    [main] Génération du dossier : EmptyEpsilon EmptyEpsilon
    [build] Démarrage de la build
    [proc] Exécution de la commande : "C:\Program Files\CMake\bin\cmake.EXE" --build C:/Users/lacom/source/repos/EmptyEpsilonFork/EmptyEpsilon/.bin/win --config Debug --target EmptyEpsilon -- -j 10
    [build] [1/2  50% :: 0.662] Building CXX object CMakeFiles/EmptyEpsilon.dir/C_/Users/lacom/source/repos/EmptyEpsilonFork/SeriousProton/src/i18n.cpp.obj
    [build] FAILED: CMakeFiles/EmptyEpsilon.dir/C_/Users/lacom/source/repos/EmptyEpsilonFork/SeriousProton/src/i18n.cpp.obj 
    [build] c:\Users\lacom\source\repos\EmptyEpsilonFork\EmptyEpsilon\..\mingw32\bin\g++.exe  -DDEBUG -DSFML_NO_DEPRECATED_WARNINGS -DVERSION_NUMBER=20200310 -DWINDOW_TITLE=\"EmptyEpsilon\" -I../../src -I../../../SeriousProton/src -IC:/Users/lacom/source/repos/EmptyEpsilonFork/SFML-2.5.1/include -Wall -g   -std=gnu++11 -MD -MT CMakeFiles/EmptyEpsilon.dir/C_/Users/lacom/source/repos/EmptyEpsilonFork/SeriousProton/src/i18n.cpp.obj -MF CMakeFiles\EmptyEpsilon.dir\C_\Users\lacom\source\repos\EmptyEpsilonFork\SeriousProton\src\i18n.cpp.obj.d -o CMakeFiles/EmptyEpsilon.dir/C_/Users/lacom/source/repos/EmptyEpsilonFork/SeriousProton/src/i18n.cpp.obj -c C:/Users/lacom/source/repos/EmptyEpsilonFork/SeriousProton/src/i18n.cpp
    [build] C:/Users/lacom/source/repos/EmptyEpsilonFork/SeriousProton/src/i18n.cpp: In member function 'bool i18n::Catalogue::load(const string&)':
    [build] C:/Users/lacom/source/repos/EmptyEpsilonFork/SeriousProton/src/i18n.cpp:60:19: error: 'io' has not been declared
    [build]      auto stream = io::ResourceProvider::get(resource_name);
    [build]                    ^~
    [build] ninja: build stopped: subcommand failed.
    [build] La build s'est achevée avec le code de sortie 1
    [main] Échec de la préparation de la cible exécutable nommée 'undefined'
    
  • Master is fixed now.

  • edited March 2020

    Btw you might want to revert the fix I mentioned before your next pull from the EE repo to avoid conflicts.

    About the SP error: that does not seem to be related. Is your SerousProton up to date?

  • yep I did ;)

    I works, but DO NOT merge my PR though, it crashes

  • It crashes because the ship templates do not have the setLocaleName function.

  • edited March 2020

    Yep I just found out.

    I can’t fix it though

  • @muerte i've send you a PM, about the translation of the Gui to French, as i'd like to help.

    Great initiative indeed.

  • edited November 2020

    Hello,

    It's been a long time since I came. Since February. I don't know if the latest versions have integrated allowing the integration of scripts in several languages, rather than translating each script by hand and updating all the scripts as soon as a new version arrives, which is very tedious and long.

    How do I know all the changes since February? To know if it's worth updating everything once again?


    EDIT : Well, I just saw Daid's post regarding all the evolutions. So my question would be rather: Is it possible not to lose all my French translation work and transfer it to this new system?

    Thank you

  • edited November 2020

    I have noticed that for 8 months, almost all the scripts that I had translated into French have been updated and more than once.

    It's impossible for me to refresh everything with code updates.

    In this case, I would have to copy all my translations into the updated scripts, but it will still take me a long time.

    I didn't understand how the new system for different languages ​​works.

    If a script is regularly updated by its author, how can the translation annex file still be up to date if the lines in the original script change?

  • "If a script is regularly updated by its author, how can the translation annex file still be up to date if the lines in the original script change?"

    Could someone answer me please? I would like to understand and use the latest version without spending tens of hours translating again and again.

    Thanks

  • If a script is regularly updated by its author, how can the translation annex file still be up to date if the lines in the original script change?

    The gettext tools can handle this, msgmerge can merge an old filled in translation file with a new updated file, it does some "fuzzy matching" and marks things that are not a 1:1 match with fuzzy for a translator to check if the translation still matches.

    It's impossible for me to refresh everything with code updates.

    Which is why your method isn't sustainable and the translation system is made.

    I didn't understand how the new system for different languages ​​works.

    The basics are explained on the wiki, but I wanted the base game translated before the scenarios, which is why there are no "empty" translation files for the scenarios yet.

  • I understand better. Thanks for the explanation.

    And there is no way to use my translations made to import even basic in a fr.po? Don't let my translation work go in the trash. I am very disappointed given the time I spent there :-(

    Note: For the game translation, remember to remove the accents.

  • And there is no way to use my translations made to import even basic in a fr.po? Don't let my translation work go in the trash. I am very disappointed given the time I spent there :-(

    @muerte

    Well, copy & paste should always work. Of course it will be some work, but not as much as it was the first time (in my experience, most of the translating time is finding the right words anyway.)

    And in poedit, pasting is pretty easy. It also can handle the merging of updated template files daid mentioned.

    Btw. I am not sure what you mean by basic, however scenario 2 and 3 seems to be already translated: https://github.com/daid/EmptyEpsilon/tree/master/scripts/locale

  • edited November 2020

    Thanks BlueShadow for the encouragement.

    How do I update the files?

    I installed Poedit

    In the new version 23112020 in the translation of the interface (fr.po) I would like for example to remove the accents, delete some errors and some texts too long which exceed the boxes, it looks ugly)

    In the link you gave me BlueShadow, I just saw that they had been deleted because they were temporary?

    Do I have the right to edit these files online?

    Edit : Do I have to modify the file on my pc and then submit it to Daid as a Pull request or something like that for him to validate and integrate with the latest version?

    Sorry I have a lot of questions but I would really like to understand so I can help with the translation.

  • edited November 2020

    I made a lot of corrections in the fr.po on my PC.

  • "In the link you gave me BlueShadow, I just saw that they had been deleted because they were temporary?" ---> do not pay attention.


    I am in the process of learning to use Github.

    This is not obvious.

    I forked the master (I think lol) and I'm on my branch (I think lol) Then I'm on the fr.po file (from my branch I think)

    I am now looking for how to transfer my local fr.po file from my pc to my branch ...

    Do I have to use Github Desktop if I want to edit files from my pc and then submit them to Github?

    Thanks for help


  • You can also use the pencil icon on the top right to edit the files,

    but that would be a bit fiddly. As you used poedit (wich is a good idea), you would need to open the files in a text editor, delete the po file in the github editor, than copy you texteditor content over. Works, but not really elegant. Usually, I am only using the webeditor for fixing small typos.

    I am not familiar with Github Desktop, but I guess it is yet another graphical git manager.

    The usual workflow is: fetching and merging the upstream repository to your local fork on your hard drive, ideally create a branch for your changes, change the files, commit the changes, upload your branch to your online fork, then submit a pull request.

    The web edit button does some of those steps automatically (and skips some others, as there would be no local git repo on you pc), but as I said, I would not recommend web edit for bigger changes.

  • edited November 2020

    " The usual workflow is: fetching and merging the upstream repository to your local fork on your hard drive, "

    That's what I don't know how to do, this step of having a local fork on my hard drive. More elegant than deleting the file on Github then uploading mine.

    While waiting to find, I'll do this (delete then upload then Pull Request)


    Thank again for your help

  • So...

    1. I deleted the fr.po file from my repository.

    2. I have created a branch attached to my Repository.

    3. I uploaded the fr.po file from my hard drive to this new branch.

    4. I made a Pull request between this new branch and my repository, it worked.

    5. Now I would like to do a Pull Request between the fr.po of my repository and the Daid Master but I don't see how to do it just for a file. It offers me for all my Repository folder I have the impression.

  • You don't need to do a pull request between two branches of your own repo. Actually, it kinda defeats the purpose of creating a new branch for the changes, wich is to seperate your changes from the main repository.

    And it seems you already figured out how to do 5.)

    Good job.😀

  • edited November 2020

    Yes thanks.

    It was to do a test and understand the mechanism after reading several tutorials. Moreover it was validated automatically.


    (5.) On the other hand there I made a pullrequest with the Master, it appears well, but I could not propose only a file (the fr.po), but the Repository folder I believe.


    1. There are very old Pullrequests. What is the deadline for validation? Is it Daid who checks all the Pullrequests?

    2. Do you know how to create a local fork on my hard drive? To avoid deleting then uploading

  • Yeah, that's normal, you always do pull request between whole branches (usually one branch of yours against the main branch of the maintainer). A pull request basically means "Hey, maintainer, here is my modified branch, can you please merge it with main branch?"

    Git checks wich files are different between the two branches, and only those files get changed when a PR gets acepted. This is why your PR only shows "1 files", as that is the only thing that is different between your branch and daids master branch.

    There is no fixed deadline. It is up to the maintainer (daid in this case), if one PR gets merged or not. If not, they are free to let them stay or to close them without merging.

    So, did you directly upload them via the web-interface? I did not know that was possible, I assumed you used github desktop. Als I don't understand why did you delete the file (from where exactly)?

  • edited November 2020

    I deleted the file because I misread what you told me: "As you used poedit (wich is a good idea), you would need to open the files in a text editor, delete the po file in the github editor, than copy you texteditor content over. "

    I deleted the file then uploaded the one from my computer that I had modified from my pc with Poedit and Notepad ++ (Look pictures)



  • Ah, I see, sorry for that, what I meant was deleting the content (in the web editor), not the file. But as you obviously can upload files directly to the web interface, there is of course no need for that.

  • I just have to upload the file from my pc and it will ask me to overwrite the file from my repository? That's right?

    I would do like that while I waited to understand all this a little better.


    One last question and I will stop abusing your patience:

    Why (in the picture) This tells me that I have done 3 pull requests to Daid: master and not just one. The 2 that I crossed out did not concern Master but only me (my Repository)

    I confuse the project and the folder Master: Daid?


    Thanks for your precious help :-)

  • edited November 2020

    It tells you that you have done 3 commits, not pull requests.

    A commit is basically a "changing step". These are also points in time one can go back to when one notices something is wrong, like bugs in a new version.

    Remember that I said a Pull request compares between branches? That means all changes and commit steps between those are recorded, even commits that you do after you submitted the pull request.


    This is actually quite useful: Sometimes, daid may tell you to change something before he would merge a pull request. Instead of doing a whole new pull request, you can simply add the new commit to the same branch, it will automatically show up in the Pull Request.

    That is another reason why you should keep branches seperate.

  • Thanks you, I understand for commits. I did this for my 2nd PullRequest after forgetting a tag.


    A. "...you should keep branches seperate." --> I did not understand that sentence.


    B. I still haven't figured out how to have a local fork or is it possible.

    C. Now I would like traduce Comms_stations.lua but it doesn't appear in fr.po :

    Is it in fr.po that it should be or in another file? Can I add it? How to add all the links from comms_stations.lua in the fr.po? Is there a more or less automatic method or I have to write everything with Nortepad ++?

    Like example ?

    #: scripts/comms_stations.lua:136

    msgid "Not enough reputation."

    msgstr "Pas assez de reputation"


    Lets go to sleep...

  • A.)

    "keep branches seperate"

    That means, use a fresh branch for every pull request and every feature you working on.

    So, if do do several things in parallel, you don't mess with pending pull request.

    Also, each new branch should derive from the master branch.

    As you see in your recent Pull request, it says "This branch has conflicts that must be resolved"


    This is because your new PR is still based on the same branch. It is like you telling git to change things based on the same file, like you started editing a text document the same time you colleage did.

    I have now Idea if you can merge your fork with daids repository (that's usually called "upstream") on the webpage, other than the radical version of deleting and recreating the fork. Bormaly you would do that merge locally.

    That is what I meant with "fetching and merging the upstream repository to your local fork on your hard drive" when I talked about the typical workflow.

    Wich leads us to to question B.)

    You would need to install the version control system "git" on your computer for a local repository, and might want to also use a graphical manager, so you don't need to memorize text commands. As far as I know, github desktop includes both things in one program.


    C.) there are some ways to automatically create/update a po-file, but the code in question has to be prepared first.

    Paragraph "Updating the shared lua code to allow for translations"


    so in your example, the line in comms_stations.lua would have to be changed from

    setCommsMessage("Not enough reputation.")
    

    to

    setCommsMessage(_("Not enough reputation."))
    


  • edited November 2020

    It's more and more clear ... and blurry at the same time ^^

    A) "This branch has conflicts that must be resolved" Ok I saw and fix it. I understood

    Something like that it's correct? :

    Daid:Master <---PR---- NewBranch1 <---Pull--- Local file in my HD First projet

    Daid:Master <---PR---- NewBranch2 <---Pull--- Local file in my HD Second projet

    .....

    NewBranch create under Repository ou Master?


    B) and C) I will install Github desktop and see if I can use it to avoid deleting branches and also to modify lua files more easily than with notepad ++ Example: science.db which is missing _ ()

    I am not a developer at all but these small modifications should be within my reach.


    D) For fr.po, a lot of the translations come from my translations of February 2020 and posted by Thomas Lacombet to whom I had passed my translations for that. I am happy because in the end my work was not lost. :-) I didn't know

    I saw that 2 scenario scripts had been partially translated into French and uploaded by Capt-t (Edge of space and Beacon). But I don't think it comes from my work in February.

    I translated quite a few others:

    Surrounded, Battlefield, Quick basic, Empty, Basic, GFTP, Atlantis, DeliverAmbassador, Escape, DefenderHunter and PvP.

    If you want them to use them I will give them to you. Obviously, this will require proofreading, as I currently do with fr.po, but it will avoid a lot of translation work.


    Thank you again for helping me understand all of that, BlueShadow

  • Some lines don't work with _( )

    I read https://github.com/daid/EmptyEpsilon/wiki/Translation-and-Localization


    Exemple in Science_db.lua that I want to finish translating :

    item = weapons:addEntry(_('Mine')) ----> OK that works

    item:addKeyValue('Drop distance', '1.2u') ----> It doesn't work if I add _( ) How to do? Maybe string.format()fonction?

Sign In or Register to comment.