CREATE YOUR AI CUM SLUT ON CANDY.AI TRY FOR FREE
x

Tutorial Tool Unity XUnity Machine Translation

sandsea_urchin

Active Member
May 7, 2019
875
1,001
Has anyone tried messing about to make a manual translation from the generated auto translation file? What I want to know is how to translate a recurring text without making a bunch of separate entries in the translation file.

It then made 100 entries that basically boils down to "スタミナ:Number=Stamina:Number", replace number with 0 to 100 . This results in an incredible amount of clutter, not even accounting the fact that there are multiples of this kind of texts, i.e. Health, Attack Power, etc.
Oh boy, was this never answered? :eek:
You need to use _Substitutions.txt, which you find in the same folder the translation files are: \AutoTranslator\Translation\en\Text. In your example type in the line:
Code:
スタミナ:=Stamina:
Then any new line caught with "スタミナ:" will be treated differently, and only one line will be used instead of 100. You'll see the results in _AutoGeneratedTranslations.txt (and you can tell how the solution needs adjusting, if that's the case).
You could also experiment with Regexes, but the chances to mess up are much higher.


Link to an ULMF thread dedicated to improving Xunity MTL:
Link to Xunity documentation:
 
  • Like
Reactions: GrandMan_

chiazx1

Member
Apr 25, 2020
105
26
i been trying use it for many unity games like Dungeon's Legion and some others but fail to get it to work.
Can someone help me?
Alt 0 is working like it suppose to and i download a fresh copy of the game and the XUnity but for some fking reason it's just doesn't work
 

Uzur123

Member
Jan 23, 2020
133
76
For example, let's say you have a parameter in game called "スタミナ" (Stamina), and it goes from a value of 0 to 100. So in game it'd look like this. スタミナ=36 or スタミナ=78 and so on.
r:"^ スタミナ= ([0-9]+)$"="Stamina=$1"

or

sr:"^\(?<stam>[\w\s]{4})(?<synt>[\=]{1})(?<count>[0-9]+)?$"="${stam}${synt}]${count}"

But both options need to be fixed if there are color tags: <color%3D#FFDD00></color>

I myself faced a problem 2 more ranks higher.
Color tags and incorrect auto templates that need to be assigned correctly.

need automatizate this:
納品アイテム……<color%3D#FFDD00>港の海水魚×100</color>\n報酬……<color%3D#FFDD00>562,125ゴールド</color>\n材料費……<color%3D#FFDD00>299,800ゴールド</color>=

r:"^ does not fit
sr:"^ cannot fix

because of the color, it is impossible to completely break the replacement, and the replacement without editing the translation gives out the wrong ingredients, and there are about 400 of them in the game ...

with an amount from 1 to 999 (x1-x999)

without automatic substitutions to make 400,000 lines is pure perversion

I try to automate the translation of ingredients that are manually edited, but every time for each new quantity, a broken translation comes.

sr:"^(?<ingr>[\S\s]+)(?<cross>[×]{1})(?<num>[0-9]+)$"="${ingr}${cross}${num}"

this option seems to work and the translation does not break, but even such lines will have to be done 400-2000 for each ingredient
r:"^港の海水魚×([0-9]+)$"="Port_sea_fish×$1"




read "help". there are auto-translator tags for text strings, but I don't know where their description is

tags "\s", "\S" and "\w"
does anyone know what exactly they are doing
 
Last edited:

DuniX

Well-Known Member
Dec 20, 2016
1,240
830
need automatizate this:
納品アイテム……<color%3D#FFDD00>港の海水魚×100</color>\n報酬……<color%3D#FFDD00>562,125ゴールド</color>\n材料費……<color%3D#FFDD00>299,800ゴールド</color>=

r:"^ does not fit
sr:"^ cannot fix
Here is a superpower.
Code:
MaxTextParserRecursion=1
See this in Auto Translator Config? Set it to 5 or something and use sr:"" as much as you want to split every part like those codes and those splits will be reevaluated again by the other regex depending on the number of recursions you set.
See for an example.
this option seems to work and the translation does not break, but even such lines will have to be done 400-2000 for each ingredient
r:"^港の海水魚×([0-9]+)$"="Port_sea_fish×$1"
You need named groups with _i at the end. Or just split the thing that is changing as things like numbers are automatically ignored by themselves. Always use sr: not r: in those cases.
 
Last edited:
  • Like
Reactions: Uzur123

Uzur123

Member
Jan 23, 2020
133
76
Here is a superpower.
Code:
MaxTextParserRecursion=1
See for an example.

You need named groups with _i at the end. Or just split the thing that is changing as things like numbers are automatically ignored by themselves. Always use sr: not r: in those cases.
Thanks a lot for the tip about the number of recursions.
About "help/example" that's what I read repeatedly to do what I did.
Can you tell us more about tags in help/example
\S
\s
\w
 

DuniX

Well-Known Member
Dec 20, 2016
1,240
830
Can you tell us more about tags in help/example
\S
\s
\w
That's just regex patterns, \s\S is the equivalent of the . (dot) but matches \n also.
(?<after>[\s\S]+)?$ will match anything till the end if it exists.
You can make ^(?<before>[\s\S]+)?(?<your stuff you want to split>regex)(?<after>[\s\S]+)?$
\w is word, useful in combination with \b which is word boundary.
 
Last edited:

Uzur123

Member
Jan 23, 2020
133
76
what I was interested in is the language (dotnet / .NET)

now I read examples there, it seems to work
 

Rakasob

Member
Apr 13, 2019
224
507
Man, I give up. The reipatcher guide on github is very unhelpful regarding font changing. Apparently there should be some files that end with "resizer.txt" in the directory, but I can't find a single one in there even if I get all the tools installed by the instructions. I feel like the creator assumes you must know what he is talking about while skipping key context.
 

DuniX

Well-Known Member
Dec 20, 2016
1,240
830
Apparently there should be some files that end with "resizer.txt" in the directory, but I can't find a single one in there even if I get all the tools installed by the instructions. I feel like the creator assumes you must know what he is talking about while skipping key context.
That's because you make your own, where the translation files are.
The bigger problem is hunting for the paths themselves.
You need EnableTextPathLogging in the config, although that might have issues with BepInEx or use RuntimeUnityEditor and manually hunt for the right text paths.
 
Last edited:
  • Like
Reactions: Rakasob

onishinigami

Newbie
Jun 27, 2017
19
7
Some game's don't create auto translate folder/file and the game itself, obviously, doesn't translate... is there anyway to force the unity game to translate or its just unable to do so?
 
Last edited: