Giter VIP home page Giter VIP logo

translationscripttools's Introduction

TranslationScriptTools

A small set of utilities for creating Translation Scripts. Program will automatically check for new releases on Github and prompt the user to install on startup.

Table of Contents

Translation Script Maker

Technical Details

The Translation Script Maker is a utility built using C# and the .NET Framework (v4.7.2).

It also makes use of these packages:

The dark theme of the ScriptViewer is based off of the Notepad++ theme VS2015-Dark.

Tutorial

Chapter Selection Window

image

This is the first window you'll see when you start the program. If you've already opened it before, a configuration file will be created and your previous choices will be remembered.

Raws Location

image

The Raws Location should be some folder that contains all of your titles. The folders' names can be anything, but the contents of those folders have a few restrictions. More on that in the Series Selection and Chapter Selection sections.

Output Location

Note: The Output Location is also the location used to open an existing file.

Chapter Folder

This is the default Output Location. It will output the script to within the Chapter folder. If you place your Raws directly within the Chapter folder (not within a subfolder), then this will have the same effect as the With Raws option.

With Raws

This option will output the script to the same location as the Raws. If you place your Raws directly within the Chapter folder (not within a subfolder), then this will have the same effect as the With Raws option.

Custom Location

This option will clear the Output Location box and allow you to click the button next to it to select a folder to output the script to.

Translator Name

The Translator Name is the name that will be added to the script file's name when output. A script file will be output with a name like so: Ch X - TL TRANSLATOR_NAME.txt, where 'X' will be replaced by the selected Chapter number, parsed from the Chapter Folder name.

Series Selection

The Series Selection ComboBox will automatically parse the folders within the Raws Location, allowing you to select any valid folder. A folder is considered valid if it meets the following requirements:

  • (Optional) Contains one or more folders matching the Regex Expression: Vol(ume)?.? *([0-9]+$).
    • e.g., "Volume 12", "Vol12", "Volume_12", etc.
    • If a Volume Folder is included, the valid Chapter Folders must be within them.
  • A Title Folder must contain one or more valid Chapter Folders which have the following requirements:
    • Chapter folders must match the following Regex Expression: Ch(apter)?.? *([0-9]+([.,][0-9]+)?$).
      • e.g., "Chapter 1", "Ch 1", "Ch_1.5", etc.
    • Chapter folders must either contain a folder for raws, or contain the raws themselves.
      • Raws must be in one of the following formats: png, jpg, jpeg.
      • A folder containing raws must match the following Regex Expression: Raw(s)?.
        • e.g., "Raw" or "Raws"

NOTE: It's strongly recommended to have your files named properly to have them sorted correctly. File names such as 001.png are best. For Spreads, if the name is X-Y.png where X is replaced by the first filename, and Y is replaced by the second filename (before you merged them), then it will automatically be marked as a spread. For example, 15-16.png.

Chapter Selection

The Chapter Selection ComboBox will automatically be filled using the valid chapter folders that were parsed. In the case of a chapter folder being within a Volume folder, the name displayed will be shown as VOLUME_FOLDER\CHAPTER_FOLDER.

Script Editor Window

image

This is the window that is used for both creating and editing a Translation Script. The top is the Input Controls, the left is the Raws Viewer, and the right is the Script Editor.

Input Controls

The Input Controls are how you'll be automatically generating the formatting syntax for the script, or navigating the different pages.

Page Selection

image

When first creating a script, pages that have not been saved yet will be bolded and marked with an asterisk in the Page Selection ComboBox. You can select any page to instantly jump to that page. You can use the left and right arrow keys to move forward and back a page, so long as you aren't currently selected on the Script Editor. I personally recommend creating the file first, by using the numpad to fill out the amount of panels (and mouse to do SFX), and the arrow keys to move forward, before going back through and filling out the rest of the script.

Saving on Page Change

Note: Any time you switch pages, the script file will be saved and output in it's current entirety. You can also save manually using the keyboard shortcut Ctrl + S. Any time there are unsaved changes, the window caption will have an asterisk. image

Total Panels

image

When the Total Panels TextBox is changed, it will automatically add or remove Panels from the Script Editor. Currently you can have up to 12 Panels on a single page (to be changed in a future refactor). This is because it will also add or remove the Panels with SFX checkboxes accordingly. Note: If the Total Panels is less than the current amount, it will remove the extra Panels, and all of their contents.

Panels With SFX

image

If you select a checkbox for a given Panel, it will automatically insert the SFX subsection formatting syntax into that Panel, at the end of the Panel, preserving any existing text in the Panel. Unchecking a box will remove the SFX subsection and everything inside of it.

Spread Checkbox

image

In the case that your file was not automatically parsed as a spread, you can manually toggle the page's status as a spread with this checkbox. Doing so will change the formatting syntax for the page headers, offsetting pages that come after it accordingly.

Raws Viewer

The Raws Viewer defaults to being zoomed out as far as possible, while retaining the correct size ratio. You can use the mousewheel to scroll in or out. While zoomed in, you can click-and-drag to move around, or use the scroll bars.

Script Editor

This is where you will actually edit your script, adding in any relevant transcriptions or translations. You are unable to edit any of the formatting syntax lines. Eventually the handling of the formatting syntax lines will be refactored to be handled better. You can add in templated formatting syntax by using the right-click menu and selecting the option you want. image

The Script Editor uses ScintillaNET, and as such, has a number of built-in keyboard shortcuts by default. Such as using Ctrl + Mousewheel to zoom in and out.

Notepad++ Theme

The Notepad++ Dark Theme that I used is located here: https://github.com/Ludomancer/VS2015-Dark-Npp and provided in this repo with the same name, "VS2015-Dark.xml". To install, see that link, or otherwise drop into the location at: %APPDATA% -> Notepad++ -> themes then switch to it via Settings -> Style Configurator... -> Select theme: VS2015-Dark.

If you open the file with Notepad++ for the first time, you might not see any styling. If this is the case, you haven't imported the TLS language into Notepad++ yet. Click on "Language" at the top of Notepad++ and click "Define your language..." at the bottom. Then click "Import" on the left. Import the file that comes with the executable and you'll be set.

Anytime you want a file to be styled using this syntax (and it's not done automatically) do the following:

  1. Click "Language" at the top of Notepad++
  2. Click "TLS" at the bottom of the menu
  3. You're done, until you close the file using the X box on the file tab, it will save your language choice. You can freely close Notepad++ without having to set the language again, unless you close the actual tab.

NOTE: Files opened with the extension of ".txt" will automatically use the TLS formatting. To change this, go to 'Define your language...' and change the language to TLS, then change the 'Ext' box to something else, or make it empty.

Keywords to note:

{           ==> Opening Code Block (For collapsing sections)
}           ==> Closing Code Block (For collapsing sections)
Page        ==> Page Keyword (For highlighting)
Panel       ==> Panel Keyword (For highlighting)
----------# ==> Opening Page Block (For highlighting)
#---------- ==> Closing Page Block (For highlighting)
---#        ==> Opening Panel Block (For highlighting)
#---        ==> Closing Panel Block (For highlighting)
[SFX]       ==> SFX Keyword (For highlighting)
[T/N]       ==> Translation Note (For highlighting)
``          ==> Single Line Comment/In-line Comment (For highlighting, second backtick is optional)
(T/P:)      ==> Single/Multi-line Comment (For highlighting, meant for notes to the Proofreader)

Any questions, feel free to contact me or create an issue (which is really helpful for keeping track of things to change or add).

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.