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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single-quote in translation not correctly interpreted #7288

Closed
cyberduck opened this issue Jun 9, 2013 · 3 comments
Closed

Single-quote in translation not correctly interpreted #7288

cyberduck opened this issue Jun 9, 2013 · 3 comments

Comments

@cyberduck
Copy link
Collaborator

ce9367d created the issue

When connecting to an SFTP server, the host key is not known.
The alert sheet shown displays "{0}" instead of the substitute text.

After testing it looks like the single quote from the translation in not handled correctly
("The host key supplied is {0}." = "La clé d'hôte fournie est {0}.";)
Escaping the single quote with a backslash doesn't help.

Step to reproduce :

  • connect to a SFTP server in French locale
  • Alert sheet shows "La clé dhôte fournie est {0}."
    (Notice the single quote disappeared)

Expected result :

  • Alert sheet should display "La clé d'hôte fournie est XX:XX:XX:XX:XX:XX:XX."
@cyberduck
Copy link
Collaborator Author

@dkocher commented

From the documentation

This is the specified behavior, although admittedly it's somewhat confusing. An apostrophe (also known as "single quote") in a MessageFormat pattern starts a quoted string, in which {0} is just treated as a literal string and is not interpreted. Two single quotes in sequence in the pattern result in one single quote in the output string. See http://java.sun.com/j2se/1.4/docs/api/java/text/MessageFormat.html#patterns for more information.

@cyberduck
Copy link
Collaborator Author

@dkocher commented

We will possibly workaround this in our locale lookup and prefix apostrophes before running through message format.

@cyberduck
Copy link
Collaborator Author

@dkocher commented

In 4b5c8c3.

@iterate-ch iterate-ch locked as resolved and limited conversation to collaborators Nov 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants