0 of 0

File information

Last updated

Original upload

Created by

AlexGoD

Uploaded by

darthalex2014

Virus scan

Safe to use

About this mod

This tool simplifies the process of updating translations for Stardew Valley mods. It intelligently merges translations from an older version of your mod (in any language) into a newer version, preserving formatting and comments. This saves time and effort, ensuring your mod stays up-to-date for international players.

Requirements
Permissions and credits
Translations
Donations
NEW
Guide for SV i18n Converter ToolsSV i18n Translation Merger. (CP to i18n)
This guide will walk you through the process of updating translations for mods that have transitioned to the i18n format, even if your existing translation is not in i18n.

Spoiler:  
Show

1) Gather the Files:
  • Download the older version of the translation you want to update.
  • Download the older version of the mod that uses the non-i18n translation.
  • Download the newer version of the mod that has been converted to the i18n format.

2) Prepare Your Workspace:
  • Create a folder for this process.
  • Extract the contents of all downloaded archives (mods and translation) into this folder.
  • Place the following executables in the same folder:
    • transtar.exe
    • SV i18n Translation Merger.exe
    • SV i18n Converter Tools.exe


3) Extract Content with Transtar:
  • Launch Transtar.exe.
  • Select the folder containing the older version of the mod (the one with content.json).
  • Click "Extract". This will generate a CP.json file.
  • Repeat the same process for the older version of the translation.

3.5) Troubleshooting Transtar Errors:
  • Sometimes, due to JSON formatting errors, Transtar might not be able to process the files completely.
  • If you encounter errors:
    • Note the "Line" number where the error occurred.
    • Click "Open File".
    • Locate the specified line and identify the problem (e.g., incorrect spacing, extra comma).
    • You can use a website like https://jsonlint.com/ to validate the entire file for errors, but you'll need to remove all comments (//) from the file first.
    • Once you've fixed the errors, save the file.
    • Repeat step 3. The errors should be resolved (at least for that line and file).


4) Compare the Extracted CP.json Files:
  • Open the CP.json files you extracted from both the older mod and the older translation.
  • Compare the num values and the corresponding key values.
    • Ideal Scenario: If the num values and key values match perfectly, the translation is likely well-structured. Proceed to step 5.
    • Mismatch Scenario: If there are mismatches, it indicates potential errors in the translation. Proceed to step 4.5.


4.5) Use JSON Merger and Sorter:
  • Launch SV i18n Converter Tools.exe.
  • Click on the "Launch JSON Merger and Sorter" button.
  • Select both CP.json files (from the older mod and translation).
  • Click "Process Files".
  • This will generate new CP.json files with perfectly matching num and key values. (JSON Merger and Sorter will overwrite the original CP.json files.)


5) Prepare the Old Translation for i18n:
  • Move the updated CP.json file (from the older translation) to your workspace folder.
  • In SV i18n Converter Tools.exe, click "Combine Source Files". This will create an i18n file for your older translation.
  • Delete the unnecessary files and rename the generated default.json file to something descriptive (e.g., old_translation_default.json).
  • Repeat the same process for the CP.json file of the older mod, creating a default.json for the original English text.
  • Finally, copy the i18n file (likely default.json) from the new version of the mod into your workspace folder.

6) Transfer Translations with SV i18n Translation Merger:
  • Launch SV i18n Translation Merger.exe.
  • Select the following files:
    • NEW MOD: The i18n file (default.json) from the new version of the mod.
    • OLD MOD: The default.json file you created from the older version of the mod.
    • OLD TRANSLATION: The default.json file you created from the older version of the translation.
  • Check the box for "Compare by text only" (as the i18n keys in the old and new mods might not match).
  • Click "Translate!".
  • Once the process reaches 100%, save the output file as YourLanguage.json (e.g., ru.json for Russian).

7) Verify the Translation:
  • Open the default.json file (from the new mod) and your newly created YourLanguage.json file.
  • Compare the files to see how many strings have been successfully translated.
You have now successfully updated your old translation to work with the new i18n version of the mod!

Guide for SV i18n Translation Merger i18n

Spoiler:  
Show

SV i18n Translation Merger: A Step-by-Step Guide
This guide demonstrates how to effortlessly update your Stardew Valley mod translations using the SV i18n Translation Merger
We'll be using the Romanceable Rasmodius Redux Revamped mod and its outdated PT-BR translation as a practical example.
1. Download the Outdated Translation:
Begin by downloading the outdated translation file that you wish to update.
  
2. Download the Updated Mod Version:
Next, download the latest version of the mod that you want to translate.

3. Acquire the Outdated Mod Version:
This step can be tricky, as not all mod authors keep older versions readily available. Here are three methods to find them:
3.1. Check for "Old Files":
Some authors conveniently provide older versions in an "Old Files" section on the mod page.


3.2. Utilize Search Engines:
Try searching for the mod's name followed by its version number enclosed in quotation marks (e.g., "Main RRRR Download V1.6.4").


3.3. Explore the Archive (if available):
If the mod's archive is accessible, locate the desired older version. Right-click on it and select "Inspect" or "Inspect Element". This will open your browser's developer tools.
 
Find the data-id attribute associated with the old mod version (it will usually highlight the mod in yellow when you hover over it).

Then, open the download link for the new version and replace its file_id in the URL with the data-id you found.

4. Organize and Extract Files:
Once you have downloaded all the necessary files, place them in a single folder and extract their contents.
 
 
    
5. Select the Correct i18n Files:
The program requires three input files:
NEW MOD: The i18n file from the new mod version (.json).
OLD MOD: The i18n file from the old mod version (in the same language as the new version) (.json).
OLD TRANSLATION: The translation file of the old mod version (in the language you want to transfer) (.json).
Refer to the image provided for a visual guide on selecting the correct files.

  
6. Initiate the Translation Process:
Click the "Translate" button and choose a location to save the updated translation file. 

Provide a suitable name for the file (e.g., pt.json).

7. Verify the Results:
Once the process is complete, open the updated translation file (e.g., pt.json) using a comparison tool like WinMerge.

You'll see that the file structure matches the new mod's translation file, and all relevant strings from the old translation have been seamlessly integrated.



Also check SV i18n Comment Namer
Also check SV i18n Converter Tools
Also check XNB to CP Converter (For Dialogs mods)

SV i18n Translation Merger

The SV i18n Translation Merger is a handy tool that helps Stardew Valley mod authors update their mod translations quickly and easily. It takes translations from an older version of your mod and seamlessly integrates them into a newer version, while preserving all comments and formatting.

How it works:
  • Comparison: The program compares i18n keys and their values in the old and new mod versions.
  • Matching: It finds translations for matching keys in the old translation file.
  • Replacement: If a key and its value are identical in both the old and new mod versions, the program replaces the i18n value in the new version with the translation from the old file.
  • Preservation: The program saves the new mod version with updated translations, keeping all comments and formatting intact.
How to use:
  • Launch the program.
  • Select the files:
    • NEW MOD: Choose the file of the new mod version. (.json)
    • OLD MOD: Choose the file of the old mod version (in the same language as the new version). (.json)
    • OLD TRANSLATION: Choose the translation file of the old mod version (in the language you want to transfer). (.json)
  • Click the "Translate" button.
  • Choose a location to save the updated mod file.
  • Wait for the process to complete. Progress is displayed on the progress bar, and log messages appear in the log window.

Here are the types of strings that the SV i18n Translation Merger will not transfer:
  • New strings: Strings that are present in the new mod version but do not exist in the old mod and translation files will remain untranslated.
  • Modified strings: If a string's content has been changed in the new mod version (e.g., to correct a typo), even if the "key" is the same, the translation will not be transferred. The program relies on an exact match of both the key and the original string.
  • Strings with changed keys: If a string's "key" has been modified in the new mod version, the translation will not be carried over. The program uses the "key" as the primary identifier for matching strings. DONE