[Tool] tCSV - CSV Translation tool v1.1

Discussion in 'The Hangar Bay' started by Exacute, Aug 13, 2017.

  1. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    1,050
    Likes Received:
    760
    tCSV - CSV Translation tool
    Translation and editing in different languages done easy.

    < Download latest version >

    Edit, and easily translate your PDA or other .csv files.

    [​IMG]
    Searchable, and sortable overview, featuring all currently used languages, organized by their KEY

    Features
    -Built in google-translate
    [​IMG]
    To help you get started. Usually not the best quality, but it can help to get the progress moving.

    -Fully featured editor
    With all current (A6.5) text-editing

    -Auto highlighter
    Of fields that was changed from an import, fields that is blank, and fields that ends in a *
    (You can use this to mark unfinished translations, by appending a * to the end)

    -Exporting of whole, or parts, of the translation work
    [​IMG]
    To help making the workload more managable, you can assign a person for instance all translations starting with "a". After the session, this person can choose "export" => selecting the specific language => select "only edited" for instance. This allows for many different versions of coop. Toy with it to get inspired for what fits your workflow.

    -Importing of whole, or parts, of a translation work
    [​IMG]
    Detects Languages present in the csv file, and allows you to import a specific one. If you want to see all KEYS affected, that is possible too.
    You can import any file, via normal file-browsing.


    -Error-handling of csv files
    To an extent, the tool will attempt to correct mistakes in your csv file, by the same algorithm as ePDA uses. It will for instance fix too many ", remove invalid KEYS, merge duplicate keys and more.
    It is not flawless, but will remove many unwanted sideeffects.

    -Features a list of languages. Those supported in the game will be shown by default. Add those you are able/wanting to translate, and don't waste space on the rest.

    -Smart integration with the ePDA
    *If dropped in the same folder as the ePDA, it will use the ePDAs config file to find the csv file

    < Download latest version >

    Requirements
    -WinRar / 7zip / other software that can read a .rar file
    -A browser. Firefox is recommended. It may not work properly in other browsers

    How to install
    1. Download the latest version from the link above

    This is by far the easiest way to install the tool, if you have the ePDA tool installed. No manual configuration are needed in this approach, given the ePDA is configured.

    Simply drop the files from the downloaded file, inside the same directory as ePDA. (So that emp_main.html, and csv_translator_main.html is in the same directory)
    [​IMG]

    2b.1. Go to your "Empyrion - Galactic Survival" folder in steam. (For instance "D:\APPS\steamapps\common\Empyrion - Galactic Survival")
    2b.2. Extract the tool anywhere *IN* or *ABOVE* the content you want to edit (for instance, if your csv file is in the 'common' foolder, it have to be extracted there, or above, as shown below:)
    [​IMG]
    2b.3. Open the csv_translator_config.txt
    2b.4. if you extracted the tool *ABOVE* what you are wanting to edit, navigate to the file, and copy the url
    (for instance D:/APPS/steamapps/common/Empyrion - Galactic Survival/Content/Extras/PDA/ , if what you want to edit is the PDA.csv, inside the normal PDA folder.
    Another example: D:\APPS\steamapps\common\Empyrion - Galactic Survival\Content\Scenarios\Dawn of Galaxy\Extras\PDA if it's the PDA.csv, inside the scenario "dawn of galaxy" you want to edit.)
    Note: any .csv file, that is in the same format as empyrion should work

    2b.5. Paste this url as the "filePath" parameter (normal pda, filepath would for instance look like)
    "filePath":"D:/APPS/steamapps/common/Empyrion - Galactic Survival/Content/Extras/PDA/",
    if you extracted the tool *IN THE* same directory, you can leave 'filePath' blank

    2b.6. Edit 'fileName' to the file you are wanting to edit. For instance
    "fileName":"PDA.csv",
    to edit the PDA.csv file.

    2b.7. Optionally edit other parameters of the config file to your liking.

    2b.8. Save it.

    3. Using it
    3.1. Open "csv_translator_main.html" in your browser (recommended: firefox)
    3.2. Use the tool. Click "Save" in the browser window to save your progress.
    [​IMG]
    3.3. A window will open, with the name of your fileName (the file you are editing)

    4. Open the window and copy everything in there
    -Go to the PDA folder of the scenario you are editing (or whatever file you are using it with)
    -Open the file
    -Copy everything from the browser tab
    -Delete everything in the file
    -Paste what you copied into the file
    -Save the file

    NOTE: This method DOES NOT automatically save. You HAVE TO follow step 4 EVERY TIME you wish to save your progress.

    Thank you
    @RexXxuS for making the navigation bar look a bit prettier. Also for providing the name and icon!

    FAQ
    Q: How do I do X

    A: It should be fairly obvious. Most things are simple 'click and type' operations. If it's not explained here, please feel free to ask.

    Q: I got an error in the browser
    A: Read the error. It is most likely due to one of three things:
    -You didn't place the files properly. Note, that they MAY NOT be in any subfolders, and should appear exactly, as step 2b.2 or 2a in the "How to install" section shows.
    -You didn't configure the config.txt file properly. Please refer to step 2b in the "How to install" section, if you are using manual path. Otherwise, make sure your ePDA works.
    -Your CSV files are corrupt.

    Q: I'm still having a hard time getting it to work
    A: Please read over the "How to install" section again. If you are still having trouble, please send your PDA.csv (or other csv file), and config.txt file, together with an image showing where you extracted the files to. Also make sure to include your Empyrion path.

    Q: An update occured: How do I get the newest version?
    A: Follow the download link in this post, and download the new version. First thing you should do, is check the csv_translator_changelog.txt, under the folder csv_translator_assets/. If there have been an update to the configuration file since your version, you have to replace *all* the current files with the new ones. If there have not been one, you can replace *all* the current files *except* the csv_translator_config.txt, to keep your current configuration. [Remember to update the config.txt, if you overwrite it][Unsure about your current version? It's stated, when you open the emp_main.html, in your browser, as the title]

    Contribute
    If you like the tool, please feel free to contribute in one of the following ways:
    -Keep an eye out for bugs, and report them
    -Suggest other wordings. English is my second language, so you might be able to explain some of the things better than it currently is.
    -Donate: If you feel generous, I won't say no to your money. It will help me to assign more time for future updates (If you want, you can donate here: Donate via Paypal . (Please note, that I do not care for your address, etc, but paypal requires it))
    -Give feedback. Let me know what could be better, or what you would like to see in the future

    License
    You are free to use this tool for personal projects. If you intend on selling the csv entries, contact me, and we can work something out [Eleon is excluded from this rule].
    You are free to share anything you create using this tool, aslong as you don't sell it.
    You are free to modify the sourcecode for personal use only
    You may not redistribute the tool, or any modified version of it.
     
    #1
    Last edited: Aug 28, 2017
  2. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    1,050
    Likes Received:
    760
  3. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    1,050
    Likes Received:
    760
    If you intend to use google chrome, please refer to this guide written by RexXxus

    28-08/2017
    v1.1 released

    Changelog

    v1.1
    -Improved csv importing further (to match ePDA v1.06)
    -Added additional Export function: Limit by hits
    -Added additional Export function: Limit by interval
    -Fixed minor bug when exporting imported
    -Added Export option: either yellow, non-yellow, or all fields.
    -Added import setting: Import only new rows, all rows, or only existing rows.

    v1.0
    -Improved importing, to sanitize input further, incase of weird doublequotes, seen in some csv files.

    v0.97
    -Improved importing to better support merging of non-unique keys (previously the behaviour was last-come takes all)

    v0.96
    -Fixed mistake with ePDA link showing, even if tool wasn't present in same folder.

    v0.95
    -Fixed cursor on navbar
    -Changed navbar to go behind popups
    -Implemented initial key-merger, in case of non-unique keys in csv.
    -Removed some debug lines

    v0.94
    -Implemented plain logo/favicon
    -Facelifted header navbar + icons
    -Fixed header navbar
    -Implemented back to top scroll button for long lists

    v0.93
    -Fixed importing. Didn't respect checkbox-selection of languages.

    v0.92
    -Fixed additional issues caused by height-fix in editor
    -Fixed comparesment text in editor, to respect newline formatting.

    v0.91
    -Fixed issue with sending wrongful encoding of ', causing the translator to not receive all data
    -Fixed height-issue with editor-view, when too much text.

    v0.9
    -Added import feature
    -Added export feature
    -Added "edited rows" memory

    v0.8
    -Made google-translate more reliable. Moved dropdown to top (occasionally, you might need to manually select language). Should be more consistent
    -Made google-translate overlay less intrusive. (technically removeable, but it's respecting their tos)
    -Added ability to add new rows (keys), incase that is somewhy wanted
    -Added ability to edit current keys. Not recommended. ("hidden": accessed from doubleclicking on the key-part)
    -Fixed counters (progress), and added visual progressbar to each colon.

    v0.7
    -Added new setting for language, and google translate
    -Now defaults to path specified by emp_config.txt file, if this exist in same-directory
    -Added support for returning to ePDA
    -Fixed models (custom)
    -Added specific languagelist, and a setting for this, and adapted the add new lang function to this
    -Fixed removal of keys with space in name
    -Redesigned inner editor, with (opt) google docs, primary lang, and editor.
    -Added google translator iframe cheater in helpers

    13-08/2017
    v1.00 released
     
    #3
    Last edited: Aug 28, 2017
    Captain Jack II likes this.
  4. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    1,050
    Likes Received:
    760
    Notice:
    As of A6.6.2 this might not work entirely as expected. The french translations currently contain a weird syntax, that the importer cannot read.
    Hopefully this can be resolved with not using this weird syntax.
    (In practice, it means that any language after 'french' in default PDA, will be wrong, as it 'bleeds' into it)

    [This is relevant to you, if you are making changes to default localization.csv, or default PDA.csv]. otherwise it should work fine for you.

    Sorry for the inconvenience, but it's out of my hands currently.
    -Exa
     
    #4
  5. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    1,050
    Likes Received:
    760
    Released v1.1
    This version corrects a very rare bug, with corrupted csv files, aswells as adds one new option for importing, and several new options for exporting.

    This should overall make it even easier to cooperate on the same CSV file.

    Updated main post with new images of these I/O features.
     
    #5
  6. Kassonnade

    Kassonnade Rear Admiral

    Joined:
    May 13, 2017
    Messages:
    3,557
    Likes Received:
    4,942
    I downloaded the last version and will give it a try soon, but not much time these days with a new job that requires all my energy.

    Can you elaborate a little bit on the french "syntax" that should be avoided or a way to circumvent it? Is it related to accents or special characters?
     
    #6
  7. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    1,050
    Likes Received:
    760
    In the current offical localization.csv, and PDA.csv, the french translation contains quotes inline. These cannot be imported properly, while also doing error-correcting of bad files.
    So if you avoid using the official PDA.csv, and/or Localization.csv, or go through it, removing "" from the french, you should be good.
    It will hopefully be fixed in 6.8 (I'm hoping).
    But simply using your own PDA, should prove no problems.
     
    #7
    Kassonnade likes this.
  8. Kassonnade

    Kassonnade Rear Admiral

    Joined:
    May 13, 2017
    Messages:
    3,557
    Likes Received:
    4,942
    OK Thanks for the info.
     
    #8

Share This Page