Git Product home page Git Product logo

ue-loc-tools's Introduction

ueloctools library

Localization tools for Unreal, plus UE and Crowdin API integration

This pack of scripts aims to help with automating gather/export/import/compile and sync process for Unreal and Crowdin. On top of that, it adds a bunch of improvements and convenience features: it sorts and annotates the source files to help translators, creates a debug ID and 'hash' pseudolocalized locales, and lets you manipulate localization targets to avoid tedious manual tasks in Loc Dashboard (e.g., adding or deleting one or more languages to one or more targets and copying languages from one target to another).

Installation:

  1. Run #create-venv-for-loc-sync.bat to create a virtual environment and install the dependencies.
  2. Configure the scripts for your project: targets, Crowdin credentials, script parameters, and task lists based on what you need.
  3. Run !loc-sync.bat to launch the loc tools and follow the instructions.

You can also run the script in automated mode with python locsync.py task-list-name -u.

By default, base.config.yaml contains several task lists tailored for different scenarios. Take a look at them and adjust to your needs.

Actual workflow depends on what features you want for the project, but the basics are as follows:

  1. Check out related assets from Perforce using the Unreal Editor source control settings. You have to set up source control in the editor for this to work.
  2. Gather and export localization data from Unreal as PO files.
  3. Prepare the debug ID and source locale: lines sorted by asset paths to group things together, with additional comments and cleaned up context info, with asset names and repetition markers for convenience. Source locale is based on the debug ID locale that contains unique and simple to remember IDs like #1234 that allow you to identify any string you see in the game (default locale: io). Optionally, prepare the 'hash' locale: basic pseudolocalization locale where the script adds beginning and end markers to all strings (default locale: ia-001). --- Possible game-specific scipts would go here ---
  4. Update source files on Crowdin using source locale files generated on step 3. This requires you to configure the integration: provide API token, project ID, and organization name (empty if you're using crowdin.com).
  5. Build the project on Crowdin, download latest translations, and copy them to the relevant Unreal project folders. This requires you to configure the integration: provide API token, project ID, and organization name (empty if you're using crowdin.com).
  6. Import translations from PO files copied over on step 5 and compile translations in Unreal.

Game-specific scripts:

  • Pull language completion rates from Crowdin and save them to a CSV for language selection menu. This requires you to adapt to the format we use or update the script.
  • Pull translation stats, compile a list of top contributors per language, and save this data to a CSV for game credits. This requires you to adapt to the format we use or update the script.
  • Reimport the relevant data tables from the CSVs generated in the above two steps. This requires you to adapt to the format we use or update the script.

You can adjust all the script parameters in base.config.yaml: set the defaults in script-parameters/[script name] sections and adjust them in task lists if you want under [task list name]/[corresponding script entry]/script-parameters section.

List of available scripts and parameters (coming later):

  • Unreal Localization Targets: add/delete cultures for loc targets, copy cultures from one target to other targets.
  • Check out the assets you're about to update from Perforce
  • Gather, export, import, compile text in Unreal using the UE command line executable
  • Generate source/debug ID locale with automated comments and sorting, generate 'hash' locale
  • Add source files to Crowdin project using predefined export settings
  • Update existing source files in Crowdin project
  • Build, download, extract, and move translated files from Crowdin to UE Localization directory
  • Generate user contribution reports on Crowdin and save the data to CSV (to reimport the data table)
  • Generate translation status reports on Crowidn and save the data to CSV (to reimport the data table)
  • Reimport assets (e.g., data tables from CSVs)
  • Create "longest" locale with start and end markers, based on TM and MT, where English text is extended to match the length of the longest translation

ue-loc-tools's People

Contributors

xabk avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

xabk-net

ue-loc-tools's Issues

Logs: Filter out some Unreal logs

Log filtering to avoid irrelevant Unreal spam (e.g., LogLinker warnings in a project that doesn't care about it)

// Move from Grass to loc-tools

Longest locale on Crowdin

Engine-agnostic implementation of the longest locale, with or without MT, purely on Crowdin via API and a custom language

Could be too slow to be usable, though...

Configs: Rework configs

  • Allow for different Crowdin projects in tasks
  • Allow for different configs for the same scripts
  • Top-level parameters accessible to all scripts, overridable on per-task level
  • Use TOML instead of YAML (native Python support)?

Classes: Rewrite the whole thing as classes via imports and not running scripts

// Should this be a separate project?

Big rewrite to change the toolset architecture

  • Each task is a class

  • loc-sync imports needed classes based on config

  • configs allow for more flexibility as they're not tied to file names

  • unreal engine-related tasks are the only exception? use template py files and generate specific py files for those tasks, run them from the same class-based system?

Crowd: MT + Pseudo

Finish development of Crowdin/MT integration

Separate into another project?..

Advanced screenshots management: replace, restore, copy

  • Create a table of keys to screenshots tags (as opposed to Crowidn string IDs to screenshots)
  • Replace an existing screenshot keeping the tags
  • Identify outdated screenshots (by looking at all tags and seeing if one of them was dropped -- which might make the others outdated as well)
  • Copy/move screenshots to another project, reapplying tags by keys

Crowd: Volume estimates via branches

Script to estimate volume via branches:

  1. Take and prep source locale
  2. Create a branch
  3. Upload the files to this branch
  4. Pretranslate perfect?
  5. Create a report
  6. Save the report in a nice format
  7. Delete branch

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.