Hail translators!
This helps Google Spreadsheet workflow for Pathos NetHack Codec translators.
- Generates Dictionary and Guides file and enables to download.
- Generated files are selectable between fully modified translation,
line number mode, or provisional mode.
In line number mode, append line number for each translated word.
In provisional mode, files are filled only when blank lines, not modified existing lines. - Checks duplicate translations within the same concepts.
AppearanceName and ItemName are judged as the same concepts.
- Semi-auto import function for Dictionary and Guides files.
Can check changes from both files or the official GitHub repository.
Deleted lines are not removed from spreadsheet automatically for safety, only changed background color.
The spreadsheet must have sheets;
-
which has the header line as line 1.
-
which has the first 5 columns represents
- Column A: row number (embedding function =row()-1 is useful)
- Column B: concept (ex. AppearanceName)
- Column C: original words
- Column D: translated words (before modified)
- Column E: translated words (after modified)
The sheet can have columns for progress management or discussions right from column E.
npm install -g @google/clasp
git clone https://github.com/h1data/pathos-translation-helper
npm install
First, you have to log in clasp CLI by your Google account.
clasp login
Create as a Web App project with clasp CLI.
clasp create
Or you can create it in Google Apps Script WEB editor. https://script.google.com/
And then fetch the local directory to the WEB project.
clasp clone [your script ID]
In Google Apps Script web editor, enter your project and press the edit icon (gear wheel), and add script properties.
- dictionarySheet: sheet name for contents of dictionary file in your spreadsheet.
- gitRepo: GitHub repository path.
- guidesSheet: sheet name for contents of guides file in your spreadsheet.
- sheetID: sheet ID of your spreadsheet. You can see it in URL of spreadsheet like below.
https://docs.google.com/spreadsheets/d/[your sheet ID]/edit#gid=xxxxx
At least, you have to modify scripts/variables.js for translation filenames of your language.
// file names
const dictionaryFileName = 'ja.Dictionary';
const guidesFileName = 'ja.Guides';
clasp push
clasp deploy -d [your deploy id]
-
File downloader
https://script.google.com/macros/s/[your deployment id/exec/download/[fileType]?provisional=false&numbered=false
[fileType]:dictionary
orguides
provisional: if true, check with provisional mode; the original words (column C) have priority. False if not specified.
numbered: if true, append line number to translated texts. Only for dictionary file. It is useful to confirm which line is used in the game. False if not specified. -
Duplicate checker
https://script.google.com/macros/s/[your deployment id]/exec/check?provisional=false
provisional: if true, check with provisional mode; the original words (column C) have priority. False if not specified. -
File importer
https://script.google.com/macros/s/[your deployment id]/exec/import
- Pathos NetHack Codec
- Portions of this page are reproduced from work created and
shared by Google
and used according to terms described in the Creative Commons 4.0 Attribution License.