Changes to .po files have no effect

Topics: Customizing Orchard, Localization
May 28, 2013 at 4:50 PM
Edited May 28, 2013 at 5:41 PM
I want to change the short date format for the fr-FR culture to yyyy/MM/dd but changes to the .po file don't seem to affect anything.

I've restarted and rebuilt the project a couple times but nothing seems to be working.

I've even added "--" to the beginning of every msgstr to try an see a difference... nothing.

Any ideas?
Developer
May 28, 2013 at 7:13 PM
Can you show us the original lines and the updated lines?
May 28, 2013 at 7:16 PM
In
...\src\Orchard.Web\Core\App_Data\Localization\fr-FR\orchard.core.po
I changed the following lines :
#: Orchard.Core.Shapes.Localization.DateTimeLocalization
#| msgid "M/d/yyyy"
msgctxt "Orchard.Core.Shapes.Localization.DateTimeLocalization"
msgid "M/d/yyyy"
msgstr "dd/MM/yyyy"
To :
#: Orchard.Core.Shapes.Localization.DateTimeLocalization
#| msgid "M/d/yyyy"
msgctxt "Orchard.Core.Shapes.Localization.DateTimeLocalization"
msgid "M/d/yyyy"
msgstr "yyyy/MM/dd"
Developer
May 29, 2013 at 4:30 PM
That's weird. And you're sure the site is configured to use the fr-FR culture?
May 29, 2013 at 10:14 PM
Edited May 29, 2013 at 10:17 PM
I am using the culture picker module.

I'm new to Orchard but I'm thinking the following in Orchard.Web\Core\Shapes\Localization\DateTimeLocalization.cs
        public LocalizedString ShortDateFormat {
            get { return T("M/d/yyyy"); }
        }
Would get the lines I've posted previously from the fr-FR localization file, no?
Coordinator
May 29, 2013 at 11:09 PM
Try to set the culture manually in the settings, and disabling the culture picker, just to be certain there is a bug and not that this is an issue with the culture picker.
May 30, 2013 at 4:43 PM
Edited May 30, 2013 at 4:45 PM
Just tried that (disabling culture picker and changing culture in settings) and it's no different.

Here's what I find very weird...
I did a search through all the project files for "lundi" (french for monday) and 2 files come up :
1. Orchard.Web\Core\App_Data\Localization\fr-FR\orchard.core.po
#: Orchard.Core.Shapes.Localization.DateTimeLocalization
#| msgid "Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday"
msgctxt "Orchard.Core.Shapes.Localization.DateTimeLocalization"
msgid "Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday"
msgstr "Dimanche, Lundi, Mardi, Mercredi, Jeudi, Vendredi, samedi"
2. Orchard.Web\Modules\Orchard.Projections\App_Data\Localization\fr-FR\orchard.module.po
#: Orchard.Projections.PropertyEditors.Forms.DateTimePropertyForm
#| msgid "Long date pattern: Monday, June 15, 2009"
msgctxt "Orchard.Projections.PropertyEditors.Forms.DateTimePropertyForm"
msgid "Long date pattern: Monday, June 15, 2009"
msgstr "Modèle date longue : Lundi 15 Juin 2009"

[... and similar parts]
So I'm assuming Orchard is getting the translations for days of the week from the first file (Orchard.Web\Core\App_Data\Localization\fr-FR\orchard.core.po).
I changed it to the following :
#: Orchard.Core.Shapes.Localization.DateTimeLocalization
#| msgid "Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday"
msgctxt "Orchard.Core.Shapes.Localization.DateTimeLocalization"
msgid "Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday"
msgstr "Dddimanche, Lllundi, Mmmardi, Mmmercredi, Jjjeudi, Vvvendredi, Sssamedi"
And it made no difference. Orchard is still showing the days of the week, in french, properly spelled...

Do I need to somehow force orchard to register the new .po files?
Does it compile them somehow when it first sees them and then doesn't actually refer to the original files unless it's forced to somehow?

Is Orchard 1.6 not using Orchard.Web\Core\App_Data\Localization\fr-FR\orchard.core.po for localization?
If it's not, where is it getting the translations from?
Coordinator
May 30, 2013 at 5:44 PM
Please open a bug, I will tag is as important and see if it has been broken.
May 30, 2013 at 9:56 PM
Edited May 30, 2013 at 9:58 PM
I am using this regularly without problems, adding new display strings then translations, all is working.
The only non regular event I noticed was following a web deploy of my site using VS2012, the App_Data with translations for several modules and orchard.web were duplicated in the correspondings bin folders, after deletion no more problem.
The duplication error was certainly due to an error in my source site.
Only problem I find in this system is that I have not found how to create 'generic' translations which could avoid translating many time the same usual strings....