Page MenuHomeWildfire Games

Fix another weird character in specific name
ClosedPublic

Authored by Silier on Jan 11 2021, 2:19 PM.

Details

Summary

Ok, definelty dont know whats going on here.
@Nescio do you see the name correctly without the diff ?
left with diff, right without

Test Plan

:)

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Silier published this revision for review.Jan 11 2021, 2:19 PM
Silier created this revision.

Build is green

builderr-debug-macos.txt
ld: warning: text-based stub file /System/Library/Frameworks//CoreAudio.framework/CoreAudio.tbd and library file /System/Library/Frameworks//CoreAudio.framework/CoreAudio are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox.tbd and library file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//ForceFeedback.framework/ForceFeedback.tbd and library file /System/Library/Frameworks//ForceFeedback.framework/ForceFeedback are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreVideo.framework/CoreVideo.tbd and library file /System/Library/Frameworks//CoreVideo.framework/CoreVideo are out of sync. Falling back to library file for linking.
ld: warning: text-based stu

See https://jenkins.wildfiregames.com/job/macos-differential/2766/display/redirect for more details.

Nescio accepted this revision.Jan 11 2021, 2:31 PM

@Nescio do you see the name correctly without the diff ?

Yes, actually I do, this is how it looks on my end (Fedora 33) without the patch:


Now I have no idea what's going on either. Isn't the way 0 A.D. renders texts supposed to be independent from the operating system used?
With the patch it doesn't look any different to me, but if whatever is changed allows the name to be rendered correctly on your end, then it's an improvement.
Any other strings that have problems being displayed?

This revision is now accepted and ready to land.Jan 11 2021, 2:31 PM
Stan added a subscriber: Stan.Jan 11 2021, 2:52 PM

I have no issue whether on Linux or on Windows :S

Stan edited the summary of this revision. (Show Details)Jan 11 2021, 2:53 PM
Stan edited the summary of this revision. (Show Details)

Probably depends on what encodings are installed?

Stan added a comment.Jan 11 2021, 3:10 PM

There does seem to be a strange whitespace chart at the end of the text though. That could be a result from copypasting.
What I don't get is that the font is the same for all platforms, which meanns there is something different when doing the actual XML parsing.
Could be a bug (or a feature, previously unsupported chars now recognized correctly) in libxml, but then I would get it on windows too, and I do not.

That shouldn't matter. The font files used by the game are images generated by script and located under binaries/data/mods/mod/fonts/.
For instance, my text editor and editor have no difficulty with displaying Chinese (e.g. 漢語拼音), but when pasting that to a name string in 0 A.D., it's displayed as unrecognized characters, because those glyphs are not present in the game fonts:

Stan added a comment.Jan 11 2021, 3:24 PM

If libxml doesn't load the character then there will be nothing to render :)

Thanks for the explanation. What version is used by the Windows builds? I have:

Package libxml2-devel-2.9.10-8.fc33.x86_64 is already installed.
Silier added a comment.EditedJan 11 2021, 3:35 PM

its 65279 character

@Angen, would I be right in thinking that you've set the language of 0 A.D. to "English (United States)"? (It also looks like Catalan, Bavarian, Scottish Gaelic, or Swedish would also have the same problem.)

@Nescio asked,

Any other strings that have problems being displayed?

Now we've identified the troublesome character (U+FEFF), we can grep for it... which reveals that the kush template elephant_stables.xml has it lurking between the first two (visible) characters ( and ) of its SpecificName. This structure does not appear to be buildable in-game, so it doesn't appear in the structree. It is accessible through Atlas, however, where this can be confirmed (once setting 0AD to an appropriate language...).

greping also reveals that:

  • The ca (Catalan), bar (Bavarian), gd (Scottish Gaelic), and sv (Swedish) languages will need their respective translations of "Parthenōn" cleared/corrected
  • The bar, gd, and gl (Galician) languages will need their translations of "Ỉḥ Abu" (Kushite Elephant Stables) and "Pr-ỉwn n ms" (Kushite Arsenal) cleared/corrected

@Angen, would I be right in thinking that you've set the language of 0 A.D. to "English (United States)"?

Oops, I forgot I'm using the UK translation, that explains the difference. When using the US default the problem does show up:


This patch fixes it.

Now we've identified the troublesome character (U+FEFF), we can grep for it... which reveals that the kush template elephant_stables.xml has it lurking between the first two (visible) characters (Ỉ and ḥ) of its SpecificName.

Please fix that string as well in this patch.

Silier updated this revision to Diff 15175.Jan 12 2021, 3:11 PM

fix kush elephant stables,
add to buildable for easier check

Owners added a subscriber: Restricted Owners Package.Jan 12 2021, 3:11 PM

Build is green

builderr-debug-macos.txt
ld: warning: text-based stub file /System/Library/Frameworks//CoreAudio.framework/CoreAudio.tbd and library file /System/Library/Frameworks//CoreAudio.framework/CoreAudio are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox.tbd and library file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//ForceFeedback.framework/ForceFeedback.tbd and library file /System/Library/Frameworks//ForceFeedback.framework/ForceFeedback are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreVideo.framework/CoreVideo.tbd and library file /System/Library/Frameworks//CoreVideo.framework/CoreVideo are out of sync. Falling back to library file for linking.
ld: warning: text-based stu

See https://jenkins.wildfiregames.com/job/macos-differential/2794/display/redirect for more details.

Silier added a subscriber: Gallaecio.EditedJan 12 2021, 3:17 PM

@s0600204 thank you for investigation, I have windows so I avoid doing grep related things :)
translations will take care of themselves :) probably they did copy paste, maybe transifex will screw it with auto translation, but we can just add comment there, maybe @Gallaecio could force clear these after this is commited but there is still chance they will reuse old translations?

translations will take care of themselves :) probably they did copy paste, maybe transifex will screw it with auto translation, but we can just add comment there, maybe @Gallaecio could force clear these after this is commited but there is still chance they will reuse old translations?

If strings are changed they are automatically prompted for retranslation, so committing this patch (without the builder entities line, of course) most likely means those characters will be gone too (in a few days).

nah, there is odd featurre on transifex which will keep translation if string is "the same", it happened with "Learn To Play" -> "Learn to Play" so can happen here too.

Then just check next week whether they're still there, and if so, manually retranslate them on transifex.