x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Localization - entries duplication in User Widgets

The main issue is that filling Text fields with same value using same localization key and namespace results in multiple entries in localization dashboard.

I have localization configured to gather text from Packages (having *.uasset as enabled extension). Imagine following configuration:

  • I have MainMenuWidget (descendant of UserWidget). It contains WidgetSwitcher and there is SettingsWidget within it. (This widget is added to player screen.)

  • Setting Widget (again desc. of UW) contains GraphicsSettingsWidget (GSW), which has multiple widgets - SliderWithValue (SVW).

  • This SliderWithValue is custom user widget (again it is descandant of UW) having slider and text field showing slider's value. As a Public variable, it exposes List of FText (exposing on Spawn), lets call it LOFT

  • For each SVW in GSW I add single element to LOFT with following configuration: (Text: Nízká (en translation is Low, Package:1A3EFF3C42038BA4861D69995A78B95F (predefined, not editable),Namespace: TCF2LocSpace, Key: LC.Low)

  • Now I compile and save all (no BP or C++ errors) and run Gather Text

I have edited exported PO file to contain only affected enties: edited PO file with (TXT association). As you can see, there are 4 entries with correct settings, but 6 another entries, got from (I believe) some generated object.

My question is:

  1. Do I really need to translate items from generated files? Why do I see them anyway? This is some kind of intermediate object I don't really want to bother.

  2. I applyed this settings to 5 items, why there are 2 items with same Key, but different msgctxt? There should be only one entry for all 5 items (except items where it was not correctly defined, but that is not this case), right?

Cleaning and rebuilding solution did not solved my problem. For more investigation, you can use this GitHub commit:https://github.com/halbich/TauCetiF2/tree/0a954663da20bf80bf6df8d405daa05715a83d6c.

Thx in advance.

Product Version: UE 4.14
Tags:
translation.txt (10.3 kB)
more ▼

asked Feb 27 '17 at 01:29 AM in Bug Reports

avatar image

Pavel Halbich
18 2 6 11

avatar image Matthew J Mar 07 '17 at 06:26 PM

Hello Pavel,

I'll be investigating this to see if I can get the same behavior to occur but I wanted to ask first; What type of variable is List of FText? Is it an FText array or is a struct with FText variables inside of it?

Edit: Disregard, I just noticed that you provided a test project.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

After speaking with our localization team (the ones who develop the Dashboard), they mentioned that an issue related to this was fixed in 4.15. Could you make a copy of your project and try upgrading the copy to 4.15 to see if the issue is resolved for you?

more ▼

answered Mar 07 '17 at 09:33 PM

avatar image Pavel Halbich Mar 14 '17 at 11:52 AM

I tested it and I can confirm that this issue is solved. However during test process I found another glitch with localization dashboard. It looks like it is not affecting actual translation during gameplay.

Original line in .cpp file is: SelectTargetComponent->CustomUsingMessage = NSLOCTEXT("TCF2LocSpace", "LC.UseTerminal", "Použít / Otevřít");

and in Localization Dashboard I can see "Pou??t / Otev??t". As you can see from opened Game.archive in Notepad++, archive seems to be incorrectly filled as well. alt text (I'm using x64 Win10 with Czech localization and culture settings)

Are you able to reproduce this behavior?

2017-03-14.png (45.2 kB)
avatar image Jamie Dale STAFF Mar 14 '17 at 03:03 PM

Is the source file you're gathering that text from saved as UTF-8? UE4 only understands ANSI and Unicode, so if it's saved in a different Windows codepage then UE4 may be misinterpreting it as ANSI.

avatar image Pavel Halbich Mar 14 '17 at 03:15 PM

In both Windows Notepad and Notepad++ it looks like it is saved in ANSI.Both editors had no problem displaying czech characters. And if I'm not mistaken, I created that cpp file from UE Editor (using add C++ class) I will do a few tests later today and we will see, if I can find more on this topic.

avatar image Pavel Halbich Mar 15 '17 at 03:01 PM

Hi, so from my testing it lookes like there is problem with BOM when using UTF-8. I changed C++ files to specifically use UTF-8-BOM and voila, now I can see correct text both in Dashboard and in Game. When I changed file to UTF-8 without it, problem reappeared.

avatar image Jamie Dale STAFF Mar 15 '17 at 03:49 PM

Hmm, that's interesting. FFileHelper::BufferToString treats everything that doesn't contain a UTF-16 BOM as UTF-8, and will just walk over the UTF-8 BOM if it exists.

What did you use to change the encoding of your file? Notepad++?

avatar image Pavel Halbich Mar 15 '17 at 03:58 PM

Yeah. On my computer I created new C++ actor, wrote NSLOCTEXT ..., compiled (btw, will be HotReloading fixed in 4.15.1? Now I need to restart UE every time I change code, which kinda ...) and run Gather text. instead of characters with czech diacritics I saw "?". So I opened Notepad++, converted to UTF-8 (file encoding description in right bottom corner changed from UTF-8 to UTF-8-BOM), recompiled, gathered and czech characters were correctly displayed (although I changed native localization to EN and then to CS back again to perform clean gather).

avatar image Matthew J Mar 15 '17 at 05:36 PM

Hey Pavel, I just wanted to chime in about the hot reloading thing; That's actually a false error message from Visual Studio. The hot reload should still be completing successfully despite what Visual Studio is telling you. We have a bug in for that here: UE-42205

avatar image Pavel Halbich Mar 16 '17 at 07:04 AM

Hi Matthew, actually UE 42205 is not the thing. I saw message that hotreaload was successfull but nothing changed (lets say when I added printing message to the log and compiled). Anyway, yesterday I found out that I have few issues with my solution - I was able to compile it and run without errors, even with circular dependency between my game modules. And maybe this was the reason why my hotreloading is broken. So I'll clean up my source and If the hotreloading problem will still be occuring, I'l let you know. It is funny that I introduced this circular dependency maybe a few weeks ago and then I worked on it without problem (I also completely Rebuilt project few times) and I needed fresh checkout from git by my friend ti find out that my solution is not buildable at all.

avatar image Pavel Halbich Mar 18 '17 at 10:41 AM

So, I managed to modify my solution and it is correct now. However, I for example did following: (My setup is main game module with multiple non primary game modules) I modified type of property in two separate modules (one is successor of UObject, one is struct and it is only container for binary saving), reload was successful (meaning no compile errors), but I still got this message:

LogModuleManager:Warning: ModuleManager: Unable to load module 'C:/Users/Halbich/Documents/GitHub/TauCetiF2/Binaries/Win64/UE4Editor-TauCetiF2-271.dll' because the file couldn't be loaded by the OS.

Warning: HotReload failed, reload failed /Script/TauCetiF2. In previous version 4.14.3 I was able to HotReload my project without problems. If you'd like to, I can provide my project and elaborate steps to reproduce this behavior (would it be better to post it it as a new question?)
avatar image Matthew J Mar 20 '17 at 03:16 PM

It would be best to keep this question related to the localization problem. Please make a new question if you still require assistance with the Hot Reload issues that you're experiencing.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question