Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Regular Expression - Put quotes! 
 
Daniel A Domingues
Jr. Member
 
Total Posts:  23
Joined:  2007-09-04
Santos, Brazil
 

Hi!

In brazilian forum, we found the need to put quotes in some translate files.
So, you can use it:

Find:

^([^"].*),(.*[\w\?\!\.\:\;\>\)\'])$

Replace:

"\1","\2"

Who improve, posts it!

Thanks and I hope it helps someone :D

 
Magento Community Magento Community
Magento Community
Magento Community
 
Michael_1
Enthusiast
 
Total Posts:  826
Joined:  2007-08-31
 

Hi Daniel,

Could your post here a few samples ?

Thank you.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Daniel A Domingues
Jr. Member
 
Total Posts:  23
Joined:  2007-09-04
Santos, Brazil
 

In the file Mage_Checkout.csv, we found:

Please select shipping methods for all addresses,Please select shipping methods for all addresses

In our translation, in portuguese, we should use:

Por favor, selecione o método de envio para todos os endereços”

But we cannot use “common” without “quotes”, because “common” is the language/field separator. So:

“Please select shipping methods for all addresses","Por favor, selecione o método de envio para todos os endereços”

We think better use always quotes.These king of samples? or using the regular expression?

If you use Notepad++, use Ctrl+R or TextFX > TestFX Quick > Find/Replace
In programming language, you can use guides by [url=http://www.devguru.com]http://www.devguru.com[/url] or [url=http://www.w3schools.com]http://www.w3schools.com[/url], and search for Regular Expression or RegExp

:D See you!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Michael_1
Enthusiast
 
Total Posts:  826
Joined:  2007-08-31
 
Daniel A Domingues -

In the file Mage_Checkout.csv, we found:

Please select shipping methods for all addresses,Please select shipping methods for all addresses
...
We think better use always quotes.

I suppose you use an outdated version of translation files. We switched to use quotes everywhere in the last one. Check this post for details.

And any way, you can safely quote any strings in your version even if they were not enquoted originally.

Please feel free to contact me on translation issues.

Thank you.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top