bcosca / fatfree

A powerful yet easy-to-use PHP micro-framework designed to help you build dynamic and robust Web applications - fast!
2.66k stars 446 forks source link

Quoted strings in language .ini files #1023

Open kumy opened 7 years ago

kumy commented 7 years ago

The page https://fatfreeframework.com/3.6/framework-variables#ConfigurationFiles states that configurations files in .ini format support string values to quoted or not.

This doesn't seems to be true for languages .ini files.

I would have expected those two statements to be equals.

my_key=My Key
my_key="My Key"

I've end up to this as crowdin.com keep adding those quotes when my strings contains also quotes inside.

Sadly Crowdin convert strings: my_key=My Key "has" some quotes to my_key="My Key \"has\" some quotes"

Having F3 support the two syntax would be nice.

kumy commented 7 years ago

Please find PR #1024 which implement this.

kumy commented 7 years ago

@Rayne Thanks for the input. Here the new PR https://github.com/bcosca/fatfree-core/pull/202

ikkez commented 7 years ago

Checked and rejected. The framework code is doing well already and quoted strings are passed as they are correctly. One reason why you can encapsulate a string with qoutes in config files is, that otherwise a , char would transform the value into an array and with a quoted string you can get around this. In lexicon files we rather need quotes as quotes to make editing more easily. Maybe raise this as issue on Crowdin, write a little import script, or search&replace \" manually.

ikkez commented 7 years ago

Well, in the meantime I also had to work with Crowdin and had a similar issue, which was just annoying 😅 We should perhaps investigate this issue once more.