missing localization term: MediaLibraryPicker

Topics: General, Localization
Nov 19, 2013 at 11:16 AM
Edited Nov 19, 2013 at 1:39 PM
thanks for your time ....
when loading a document with MediaLibraryPicker (MLP) the term 'Download' won't get translated.

To test my site I normally use 'US-en'; the productive site runs on 'FR-fr' --> otherwise I do not miss any other translation!!
PS: clicking 'download' loads the doc just fine!

what am I missing here? what do I need to check in addition?
Below the info which I think is relevant.
thanks for your time and hints
ed
  • The 'Orchard.module.po' in Module 'Orchard.MediaLibrary' carries:
#: ~/Modules/Orchard.MediaLibrary/Views/Parts/Document.Summary.cshtml
#| msgid "Download"
msgctxt "~/Modules/Orchard.MediaLibrary/Views/Parts/Document.Summary.cshtml"
msgid "Download"
msgstr "Télécharger"
  • the active template (shape tracing) is: ~/Themes/TheThemeMachine/Views/Parts.Document.Summary.cshtml:
    <a href="@mediaPart.MediaUrl" target="_blank">
    <img src="data:image/png;base64,iVBORw0KGgoAAAANSUh... ..gg=="/> <span>@T("Download")</span>
    </a>
  • The appropriate 'ContentType' carries the 'Localization' part!
Developer
Nov 19, 2013 at 1:46 PM
The answer is in the question ;-)

You made an alternate :
~/Themes/TheThemeMachine/Views/Parts.Document.Summary-Document.cshtml

So, you need to add orchard.module.po in ~/Themes/TheThemeMachine/App_Data/fr-FR/
and copy your translation :
#:  ~/Themes/TheThemeMachine/Views/Parts.Document.Summary-Document.cshtml
#| msgid "Download"
msgctxt "~/Themes/TheThemeMachine/Views/Parts.Document.Summary-Document.cshtml"
msgid "Download"
msgstr "Télécharger"
Nov 19, 2013 at 2:36 PM
thanks a lot, you guided me to the right spot

in the ThemeMachine fr-FR I had an old .po (no entry for 'download' !) So I copied the .po from the Orchard.MediaLibrary modul.

__HOWEVER ...

__the amazing thing: when NOT using the alternate i.e. orchard picks the .cshtml from the MediaLibrary it works! I can repeat this.

Question : is copying the App_Data folder good enough OR is the 'translation' procedure needed!?

PS: I think I (double) checked everything very carefully ....
any other idea
thanks
ed
Nov 19, 2013 at 3:26 PM
just made another observation :

why is 'shape tracing' given me alternates like below? see the very end ' .....en-us.cshtml'!?

Parts.Document.Summary-url-reseau-culture-varen-us.cshtml (only on the ones which include content item info (reseau-culture-var)

The site is definitely on fr-FR!

... I run out of ideas
thanks for anybody's time
ed
Coordinator
Nov 19, 2013 at 3:35 PM
Looks like the code which is rendering the alternates is using the Site culture instead of the Current culture
Nov 19, 2013 at 3:54 PM
Edited Nov 19, 2013 at 9:00 PM
well I get more and more confused ...

the site (settings) is on fr-FR and 99% translates correct except this 'download'!
AGAIN: it translates 100% correct when using the Original Orchard.MediaLibrary template. Only with the' alternate' in
Thememachine/View it fails!

based on agriffards recommendation I have now in the Themes App_Data ...fr_FR: 'orchard.module.po' (which includes the term 'download / télécharger')

For a test I ran:
install translation d:\CMSites\fr-FR.zip
again, and now I have in addition also: 'orchard.theme.po' in the same fr-FR folder.

do I need both? well I'm confused
thanks for any advise
ed
Nov 20, 2013 at 7:33 AM
Edited Nov 20, 2013 at 7:35 AM
I setup a complete NEW test environment and see the very same problem!
which is:
as soon as I use the alternate....
"~/Themes/TheThemeMachine/Views/Parts.Document.Summary-Document.cshtml"
..... the translation doesn't take place!

when the the 'original' is used ....
~/Modules/Orchard.MediaLibrary/Views/Parts/Document.Summary.cshtml
.... the translation is ok!

what do I mean with NEW test environment: (runs in WebMatrix)
  • downloaded Orchard.Web.1.7.1.zip from codeplex
  • installed Vandelya.Industries features
  • downloaded newest fr_FR .po
  • ran 'install translation d:\CMSites\fr-FR.zip'
  • there are NONE of my own Modules installed, all I use are the ModuleLibraryPicker fields
  • there is: \Orchard.MediaLibrary\App_Data\Localzsation\fr_FR\orchard.module.po (which contains the translation for 'download')
  • there is: \TheThemeMachine\App_Data\Localization\fr_FR\orchard.theme.po (does NOT contain a 'download' translation)
it is repeatable
what else can I check, do wrong!?
thanks for your time ed
Coordinator
Nov 20, 2013 at 8:49 AM
Please file a bug.
Nov 20, 2013 at 10:02 AM
ok, done . Item nr: 20293
ed