Skip to content

Commit

Permalink
Quote translations to stop them looking like numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhughes committed May 7, 2018
1 parent 7c79715 commit 52f0ba7
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions config/locales/cs.yml
Expand Up @@ -2506,16 +2506,16 @@ cs:
unnamed: nepojmenovaná cesta
courtesy: Trasa díky %{link}
exit_counts:
first: 1.
second: 2.
third: 3.
fourth: 4.
fifth: 5.
sixth: 6.
seventh: 7.
eighth: 8.
ninth: 9.
tenth: 10.
first: '1.'
second: '2.'
third: '3.'
fourth: '4.'
fifth: '5.'
sixth: '6.'
seventh: '7.'
eighth: '8.'
ninth: '9.'
tenth: '10.'
time: Čas
query:
node: Uzel
Expand Down

4 comments on commit 52f0ba7

@tomhughes
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Nikerabbit I had to change this to stop ruby's YAML parser reading them as numbers - could you have a look at your export code and see if you can make it quote them?

@Nikerabbit
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, your parser is right: http://yaml.org/spec/1.2/spec.html#id2805071

We are using phpyaml, which only claims to support yaml 1.1 – that spec is not clear on this. I have reported https://bugs.php.net/bug.php?id=76309 anyway.

I will look if I can use http://php.net/manual/en/yaml.callbacks.emit.php to force the type to string in the meanwhile.

@pnorman
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is unchanged between 1.2 and 1.1 but haven't looked in detail.

@Nikerabbit
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately I did not manage to get the callback option to do anything useful. In the end I am proposing a hack that inserts magic tokens to problematic values which are converted to quotes by a simple string replacement. I think it is safe enough to not break anything else with a small performance impact.

Please sign in to comment.