Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language Testing Bug 馃悶 #43

Closed
Timthreetwelve opened this issue Nov 2, 2023 · 5 comments
Closed

Language Testing Bug 馃悶 #43

Timthreetwelve opened this issue Nov 2, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@Timthreetwelve
Copy link
Owner

Report a problem with a translation

When using the language testing that was introduced in version 0.9.3, line breaks (carriage returns), expressed as 
 are not being processed when read from the file at runtime. In other words, the line of text isn't breaking. When the same file (or string) is added as a resource and compiled, the line breaks work fine. Everything else about the test process works fine.

Example:

    <sys:String x:Key="MsgText_Error_TooManyRequests" xml:space="preserve">Error connecting.&#13;Too many requests.</sys:String>

Displays as:
Error connecting.Too many requests.

When it should display as:

Error connecting.
Too many requests.

I'm thinking that it has something to do with the file being read at runtime vs being compiled as a resource. I've tried encoding the file as ANSI, UTF-8, UTF-8 with BOM, and UTF-16 with the same result.

This has me stumped at the moment. Reaching out for help. If someone has an idea, let me know.

In the meantime, language contributors should continue using language testing, but be aware that this is happening.

Contribute a translation

No response

If this is a contribution, enter the language name and code

No response

If you wish to have your contribution acknowledged

No response

@Timthreetwelve Timthreetwelve added bug Something isn't working help wanted Extra attention is needed translation Related to translations labels Nov 2, 2023
@Timthreetwelve Timthreetwelve self-assigned this Nov 2, 2023
@Timthreetwelve Timthreetwelve removed the translation Related to translations label Nov 2, 2023
@CMTriX
Copy link
Collaborator

CMTriX commented Nov 2, 2023

\n
\r

@Timthreetwelve
Copy link
Owner Author

Unfortunately, the standard newline characters don't work. They just get displayed.

It's not that much of a problem since it works correctly once the language is compiled. And it's only in GetMyIP.

If a solution doesn't present itself, I'll just revert to the way I did it in WUView, which is to have two separate strings and not use the &#13;

@CMTriX
Copy link
Collaborator

CMTriX commented Nov 3, 2023

Ok! 'Niet geschoten is altijd mis.'

@bovirus
Copy link
Collaborator

bovirus commented Nov 3, 2023

@Timthreetwelve

For me is not a big problem and continue to use " " because the view problem is only during language testing.

If you have a long string or multiperiod string could be an idea to have multiple strings like

<sys:String x:Key="SettingsItem_UseOSLanguageToolTipLine1">When this option is selected, the language specified in the Windows settings will</sys:String>
<sys:String x:Key="SettingsItem_UseOSLanguageToolTipLine2">be used if a translation is available, otherwise English (en-US) will be used.</sys:String>

or multiperiod strings like

<sys:String x:Key="MsgText_Error_JsonParsing" xml:space="preserve">Error parsing JSON. {0} Please consider opening an issue and attaching the log file.</sys:String>

in

<sys:String x:Key="MsgText_Error_JsonParsing1" xml:space="preserve">Error parsing JSON.</sys:String>
<sys:String x:Key="MsgText_Error_JsonParsing2" xml:space="preserve">Please consider opening an issue and attaching the log file.</sys:String>

@Timthreetwelve
Copy link
Owner Author

I will revert to the method of defining two or more strings. Fortunately, only this project uses the &#13; I can probably get that done in less time than fixing the issue. That will be a good project for a cold, rainy day. 馃槈

@Timthreetwelve Timthreetwelve removed the help wanted Extra attention is needed label Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants