Cyberduck Mountain Duck CLI

#7288 closed defect (fixed)

Single-quote in translation not correctly interpreted

Reported by: 1010 Owned by: dkocher
Priority: low Milestone: 4.4
Component: localization Version: 4.3.1
Severity: normal Keywords:
Cc: Architecture: Intel


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."

Change History (4)

comment:1 Changed on Jun 11, 2013 at 9:28:35 AM by dkocher

  • Milestone set to 4.3.2
  • Status changed from new to assigned

comment:2 Changed on Jun 11, 2013 at 9:32:25 AM by dkocher

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 for more information.

comment:3 Changed on Jun 11, 2013 at 9:33:13 AM by dkocher

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

comment:4 Changed on Jun 11, 2013 at 11:33:35 AM by dkocher

  • Resolution set to fixed
  • Status changed from assigned to closed

In r11122.

Note: See TracTickets for help on using tickets.