bbepis/XUnity.AutoTranslator

How to remove the translation of icons (<Sprite=...>) in the game?

Closed this issue · 26 comments

Good afternoon, for the first time I am using this program to translate the game Fractured Online. I have the following problem, the translator is trying to translate the icons in the game (Screenshot_1 translation is disabled), it is worth turning on the program (Screenshot_2), as all the icons change to <Sprite=...>. How can I fix this? Maybe someone has encountered something like this? Or the developer himself can explain how to fix it. I will be very grateful to all for help.

Screenshot_1
Screenshot_2

Lmeks commented

Can't see an example of a translation (from translation folder)
try
sr:"^(?<sprite_i><sprite[^>]+>)(?<text>.+)?$"="${sprite_i}${text}"

Sorry, but I'm a complete amateur in these matters, I don't even know what you mean.

maybe it's a config file? D:\Games\Steam\steamapps\common\FracturedOnline\AutoTranslator

[Service]
Endpoint=GoogleTranslateV2
FallbackEndpoint=GoogleTranslateCompat

[General]
Language=ru
FromLanguage=en

[Files]
Directory=Translation{Lang}\Text
OutputFile=Translation{Lang}\Text_AutoGeneratedTranslations.txt
SubstitutionFile=Translation{Lang}\Text_Substitutions.txt
PreprocessorsFile=Translation{Lang}\Text_Preprocessors.txt
PostprocessorsFile=Translation{Lang}\Text_Postprocessors.txt

[TextFrameworks]
EnableIMGUI=False
EnableUGUI=True
EnableNGUI=True
EnableTextMeshPro=True
EnableTextMesh=False
EnableFairyGUI=True

[Behaviour]
MaxCharactersPerTranslation=500
IgnoreWhitespaceInDialogue=False
MinDialogueChars=20
ForceSplitTextAfterCharacters=0
CopyToClipboard=False
MaxClipboardCopyCharacters=2500
ClipboardDebounceTime=1.25
EnableUIResizing=True
EnableBatching=True
UseStaticTranslations=True
OverrideFont=arialuni_sdf_u2018
OverrideFontSize=
OverrideFontTextMeshPro=arialuni_sdf_u2018
FallbackFontTextMeshPro=arialuni_sdf_u2018
ResizeUILineSpacingScale=
ForceUIResizing=False
IgnoreTextStartingWith=\u180e;
TextGetterCompatibilityMode=False
GameLogTextPaths=
RomajiPostProcessing=ReplaceMacronWithCircumflex;RemoveApostrophes;ReplaceHtmlEntities
TranslationPostProcessing=ReplaceMacronWithCircumflex;ReplaceHtmlEntities
RegexPostProcessing=
CacheRegexPatternResults=False
PersistRichTextMode=Final
CacheRegexLookups=False
CacheWhitespaceDifferences=False
GenerateStaticSubstitutionTranslations=False
GeneratePartialTranslations=False
EnableTranslationScoping=True
EnableSilentMode=True
BlacklistedIMGUIPlugins=
EnableTextPathLogging=False
OutputUntranslatableText=False
IgnoreVirtualTextSetterCallingRules=False
MaxTextParserRecursion=1
HtmlEntityPreprocessing=True
HandleRichText=True
EnableTranslationHelper=False
ForceMonoModHooks=False
InitializeHarmonyDetourBridge=False
RedirectedResourceDetectionStrategy=AppendMongolianVowelSeparatorAndRemoveAll
OutputTooLongText=False
TemplateAllNumberAway=False
ReloadTranslationsOnFileChange=False
DisableTextMeshProScrollInEffects=False
CacheParsedTranslations=False

[Texture]
TextureDirectory=Translation{Lang}\Texture
EnableTextureTranslation=False
EnableTextureDumping=False
EnableTextureToggling=False
EnableTextureScanOnSceneLoad=False
EnableSpriteRendererHooking=False
LoadUnmodifiedTextures=False
DetectDuplicateTextureNames=False
DuplicateTextureNames=
EnableLegacyTextureLoading=False
TextureHashGenerationStrategy=FromImageName
CacheTexturesInMemory=True
EnableSpriteHooking=False

[ResourceRedirector]
PreferredStoragePath=Translation{Lang}\RedirectedResources
EnableTextAssetRedirector=False
LogAllLoadedResources=False
EnableDumping=False
CacheMetadataForAllFiles=True

[Http]
UserAgent=
DisableCertificateValidation=True

[TranslationAggregator]
Width=400
Height=100
EnabledTranslators=

[Debug]
EnableConsole=False

[Migrations]
Enable=True
Tag=5.4.1

[Baidu]
BaiduAppId=
BaiduAppSecret=
DelaySeconds=1

[BingLegitimate]
OcpApimSubscriptionKey=

[Custom]
Url=

[DeepL]
ExecutableLocation=
MinDelaySeconds=2
MaxDelaySeconds=6

[DeepLLegitimate]
ExecutableLocation=
ApiKey=
Free=False

[ezTrans]
InstallationPath=

[Google]
ServiceUrl=

[GoogleV2]
ServiceUrl=
RPCID=MkEWBc
VERSION=boq_translate-webserver_20210323.10_p0
UseSimplest=False

[GoogleLegitimate]
GoogleAPIKey=

[LecPowerTranslator15]
InstallationPath=

[LingoCloud]
LingoCloudToken=

[Watson]
Url=
Key=

[Yandex]
YandexAPIKey=

Lmeks commented

You need to make a splitter regex translation for each instance of an icon being translated. An example of it would be the string I put above, but you need larger ones if you want it translated manually.

Lmeks commented

Or you can wait till someone fixes richtextparser.cs

IgnoreTextStartingWith=\u180e; вот решение твоих проблем пропиши все названия спрайтов через ; и все

I have a custom translation server (google api) on a js node. it just corrected this situation

I worked a lot so that there were no such problems, I can share with you this server and a custom library with a config that will work with this server

That is, you will need to run a local server that will just process and translate you will also need to set up the config and put the library in the translator folder If this option suits you, let me know

IgnoreTextStartingWith=\u180e; вот решение твоих проблем пропиши все названия спрайтов через ; и все
Не понял, прям все строчки целиком? по типу
<sprite="IconsUI" name="Weight"> 1,29 Kg=<sprite="IconsUI" name="Weight">
Там полно таких, подобное не только в этом месте.
Около 100+ строк наверное

You need to make a splitter regex translation for each instance of an icon being translated. An example of it would be the string I put above, but you need larger ones if you want it translated manually.

Man, this is too complicated for me. I don't know anything about this stuff.

Or you can wait till someone fixes richtextparser.cs

I'd love someone to help me. I don't know what you're talking about...

I have a custom translation server (google api) on a js node. it just corrected this situation

I worked a lot so that there were no such problems, I can share with you this server and a custom library with a config that will work with this server

That is, you will need to run a local server that will just process and translate you will also need to set up the config and put the library in the translator folder If this option suits you, let me know

Sounds like a solution, but apparently it's complicated too, and I won't understand how to do it...I'm a complete nub in such matters.

IgnoreTextStartingWith=\u180e; вот решение твоих проблем пропиши все названия спрайтов через ; и все

если пишу IgnoreTextStartingWith=\u180e;sprite;Weight;ManaRegeneration;

ничего не меняется

Sounds like a solution, but apparently it's complicated too, and I won't understand how to do it...I'm a complete nub in such matters.

Send me the configuration file and also point it to bepinex.
or
Melon loader


  1. First of all, we install node js itself
    https://nodejs.org/en/download/prebuilt-installer

  1. then download and unzip the archive with the local translation processing server
    (the server also caches already translated texts, which speeds up its work)
    node_GoogleTranslator_server.zip

  1. next you need to put the library
    (custom translation method)
    which will work with this server
    CustomTranslateBanch.zip
    if this is Melon Loader
    then along the way
    GAME_PATH\UserLibs\Translators\CustomTranslateBanch.dll
    If you have Bepinex
    then along the way
    GAME_PATH\BepInEx\plugins\XUnity.AutoTranslator\Translators\CustomTranslateBanch.dll

  1. Next you need to specify the local server translation in the software config
    having written this in the config
    find the lines and replace with
[Service]
Endpoint=CustomTranslateBanch   <--- this
FallbackEndpoint=

[General]
Language=ru  <- you lang code
FromLanguage=auto
.....
[Behaviour]
MaxCharactersPerTranslation=2200
...
TemplateAllNumberAway=True

And at the very end of the file add this

[CustomTranslateBanch]
Url=http://localhost:4000/translate_batch_app

  1. now go to the software folder
    "node_GoogleTranslator_server"

  1. and run the installation file there
    "start_install.cmd"
    wait for completion

  1. then run the file
    "start_GoogleTranslator_server.cmd"

8 . and only then launch the game

In the end, your server and game should work

If you don’t understand where to put it in the config, then here is a ready-made config for Melon Loader

GAME_PATH\AutoTranslator\Config.ini

Config.zip

also you can skip installing the server locally (by directing requests to my test server)
but it won’t work for long, it will last another 4 months

in this case you will only need to complete steps 3 and 4
Well, change the address in step 3

You can send requests to the test server by specifying in the config
this address

[CustomTranslateBanch]
Url=http://ec2-13-60-57-68.eu-north-1.compute.amazonaws.com:4000/translate_batch_app

And you will need to clear the translation that you already have
so that he can re-translate everything that is wrong

My advice is follow steps 3 and 4
and try to see if everything works as it should on a test server and only then install the local version

Sounds like a solution, but apparently it's complicated too, and I won't understand how to do it...I'm a complete nub in such matters.

Send me the configuration file and also point it to bepinex. or Melon loader

  1. First of all, we install node js itself
    https://nodejs.org/en/download/prebuilt-installer

  2. then download and unzip the archive with the local translation processing server
    (the server also caches already translated texts, which speeds up its work)
    node_GoogleTranslator_server.zip

  3. next you need to put the library
    (custom translation method)
    which will work with this server
    CustomTranslateBanch.zip
    if this is Melon Loader
    then along the way
    GAME_PATH\UserLibs\Translators\CustomTranslateBanch.dll
    If you have Bepinex
    then along the way
    GAME_PATH\BepInEx\plugins\XUnity.AutoTranslator\Translators\CustomTranslateBanch.dll

  4. Next you need to specify the local server translation in the software config
    having written this in the config
    find the lines and replace with

[Service]
Endpoint=CustomTranslateBanch   <--- this
FallbackEndpoint=

[General]
Language=ru  <- you lang code
FromLanguage=auto
.....
[Behaviour]
MaxCharactersPerTranslation=2200
...
TemplateAllNumberAway=True

And at the very end of the file add this

[CustomTranslateBanch]
Url=http://localhost:4000/translate_batch_app
  1. now go to the software folder
    "node_GoogleTranslator_server"

  2. and run the installation file there
    "start_install.cmd"
    wait for completion

  3. then run the file
    "start_GoogleTranslator_server.cmd"

8 . and only then launch the game

In the end, your server and game should work

If you don’t understand where to put it in the config, then here is a ready-made config for Melon Loader

GAME_PATH\AutoTranslator\Config.ini

Config.zip

also you can skip installing the server locally (by directing requests to my test server) but it won’t work for long, it will last another 4 months

in this case you will only need to complete steps 3 and 4 Well, change the address in step 3

You can send requests to the test server by specifying in the config this address

[CustomTranslateBanch]
Url=http://ec2-13-60-57-68.eu-north-1.compute.amazonaws.com:4000/translate_batch_app

And you will need to clear the translation that you already have so that he can re-translate everything that is wrong

My advice is follow steps 3 and 4 and try to see if everything works as it should on a test server and only then install the local version

Friend, even in the text, the size of the message, it looks too complicated. I hope those who have described alternative methods will find solutions. Thanks for the description, this will be the last method I will use if it doesn't work out.

Friend, even in the text, the size of the message, it looks too complicated. I hope those who have described alternative methods will find solutions. Thanks for the description, this will be the last method I will use if it doesn't work out.

This will work in 90% of cases) since I did a lot specifically to fix this problem

do not complete everything.
for the test, steps 3 and 4 are enough, this is quick
My advice is follow steps 3 and 4 and try to see if everything works as it should on a test server and only then install the local version

image
image
everything works as it should
also here is the finished one
new font corrections for this game
FontFix.zip

without correcting the font the text will appear like this (It seems to only apply to the Cyrillic alphabet)
image

  1. Install Melon Loader 0.6.6 version

  1. Put all folders and files from the archive in the root of the game folder
    FracturedOnline Melon loaderV0.6.6_translator.zip
+ This is an archive of the assembled config for Auto Translator
+ font fixes (absolutely all fonts are supported)
+And the Translation Processing Server to eliminate errors

(the server is solving a specific problem with sprites)
(The server receives the text and generates the correct requests! excluding icons and everything like that from the translation and then returns the correct result with unchanged (untouched icons, etc.))


  1. Next install Node js
    from the official website
    https://nodejs.org/en/download/prebuilt-installer

  2. Run the game via start_install_and_run game.bat
    the script will automatically check for the presence of all dependencies and if everything is present, it will launch both the translation server and the game
    if something is missing, it will install and close (in this case, after installation, just restart the script)


I think the problem is partially solved (since third-party tools are used) (but it’s a pain in the ass to rewrite everything in C#)
so I took the easy route using node js as an intermediary between translations
(the application is self-written and uses free libraries)

Essentially the application is a text processing script before translation + caching system

the translation itself is directly performed via Google api

I would change the title of the topic and include the name of the game there. Maybe someone else will be looking for fixes for this game

  1. Install Melon Loader 0.6.6 version

  2. Put all folders and files from the archive in the root of the game folder
    FracturedOnline Melon loaderV0.6.6_translator.zip

+ This is an archive of the assembled config for Auto Translator
+ font fixes (absolutely all fonts are supported)
+And the Translation Processing Server to eliminate errors

(the server is solving a specific problem with sprites) (The server receives the text and generates the correct requests! excluding icons and everything like that from the translation and then returns the correct result with unchanged (untouched icons, etc.))

  1. Next install Node js
    from the official website
    https://nodejs.org/en/download/prebuilt-installer
  2. Run the game via start_install_and_run game.bat
    the script will automatically check for the presence of all dependencies and if everything is present, it will launch both the translation server and the game
    if something is missing, it will install and close (in this case, after installation, just restart the script)

I think the problem is partially solved (since third-party tools are used) (but it’s a pain in the ass to rewrite everything in C#) so I took the easy route using node js as an intermediary between translations (the application is self-written and uses free libraries)

Essentially the application is a text processing script before translation + caching system

the translation itself is directly performed via Google api

Screenshot_1
Screenshot_2
Screenshot_3
Screenshot_4

Friend, thanks for the help, but I'm confused that google chrome, windows antivirus protection and all around, is warning me about a virus in your file and not recommending me to download it.

saying that this file contains Trojan:Script/Wacatac.B!ml. - https://www.microsoft.com/en-us/wdsi/threats/malware-encyclopedia-description?name=Trojan%3AScript%2FWacatac.B!ml&threatid=2147735503

https://www.virustotal.com/gui/url/b944109e7c44ec7a1af382c00286f5faa0021731779c4a7df9ddf186f274fe09/detection

I don’t know what you have there and where you find it... MB your PC is already infected... but what I threw off! clean!

https://www.virustotal.com/gui/url/b944109e7c44ec7a1af382c00286f5faa0021731779c4a7df9ddf186f274fe09/detection

I don’t know what you have there and where you find it... MB your PC is already infected... but what I threw off! clean!

All these messages are given by Google Chrome and Windows, when trying to download the file from your link).

Screenshot_1

All these messages are given by Google Chrome and Windows, when trying to download the file from your link).

friend, I think you set some kind of shit on the computer, so he spams God knows what

All these messages are given by Google Chrome and Windows, when trying to download the file from your link).

friend, I think you set some kind of shit on the computer, so he spams God knows what

Okay, forget it. The virus warning only occurs on your link)

Screenshot_1

Все эти сообщения выдают Google Chrome и Windows, при попытке загрузить файл по вашей ссылке).

друг, мне кажется ты на компе какую-то хрень поставил, вот он и спамит бог знает чем

Ладно, забудь. Предупреждение о вирусе появляется только по твоей ссылке)

Скриншот_1

I sent you a report from Virus Tolal! virus total says there are no viruses there! so there can be no complaints against me! You decide for yourself whether to use help or not!

(You can copy the link and throw it into the total virus yourself!!)