Author Topic: Translate : Please select an option  (Read 1079 times)

Mister Paul

  • Jr. Member
  • **
  • Posts: 215
  • Joomla! 3.9.6 - VirtueMart 3.4.2
Translate : Please select an option
« on: January 11, 2019, 22:17:52 pm »
Hi,

I use an localized version of VM, but for children products but I cant get any translation for "Please select an option"

This is positioned just above the scroll down menu containing all chidren. But I can't find where I could change that content.
I tried to add: VM_CUSTOM_FIELD_VARIANT="My Translation" in /language/overrides/fr-FR.override.ini
But that doesn't work...

Where do I have to modify the code?

Thanks for your help
Paul

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3534
  • using Matomo instead of Google Analytics
Re: Translate : Please select an option
« Reply #1 on: January 11, 2019, 23:19:16 pm »
"Please select an option" is not a string in the VM3 language files. For the child products the original reads "Choose a variant".
I usually use the free Notepad++ editor's "Find in files" search feature to locate language keys and/or strings.
But you may also find the corresponding language key if you go to the Joomla overrides, click the 'New" button and then search for the string in the provided search form.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 2423
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Translate : Please select an option
« Reply #2 on: January 12, 2019, 00:24:51 am »
It is a text found in the file:
jquery.validationEngine-en.js

On line 10:
Code: [Select]
(function($){
    $.fn.validationEngineLanguage = function(){
    };
    $.validationEngineLanguage = {
        newLang: function(){
            $.validationEngineLanguage.allRules = {
                "required": { // Add your regex rules here, you can take telephone as an example
                    "regex": "none",
                    "alertText": "* This field is required",
                    "alertTextCheckboxMultiple": "* Please select an option",
                    "alertTextCheckboxe": "* This checkbox is required"
                },

There should be a .js file in Your language, check "com_virtuemart/assets/js/languages"

Jörgen @ Kreativ Fotografi
Joomla 3.9.8
Virtuemart 3.4.x
Olympiantheme Hera (customized)

Mister Paul

  • Jr. Member
  • **
  • Posts: 215
  • Joomla! 3.9.6 - VirtueMart 3.4.2
Re: Translate : Please select an option
« Reply #3 on: January 12, 2019, 10:28:11 am »
Thank you.

For now I have 3.4.0 Virtuemart version. I know that I have to update... but I have to clean other stuff before.

In this version there is this string in jquery.validationEngine-en.js
                    "alertTextCheckboxMultiple": "* Please select an option",

It's well translated in jquery.validationEngine-fr.js
                    "alertTextCheckboxMultiple": "* Choisir une option",

I have selected French in Virtuemart Configuration / Language Settings / Shop Language
But this string is not displayed (only the english version is shown).

What could be the problem?

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3534
  • using Matomo instead of Google Analytics
Re: Translate : Please select an option
« Reply #4 on: January 12, 2019, 10:58:29 am »
What could be the problem?

Might be a cache problem. Did you try to clear all Joomla/VirtueMart cache and browser cache already?
If that  doesn't help, it could be a language configuration problem. Are your products stored in database tables with a _fr_fr suffix?
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

Mister Paul

  • Jr. Member
  • **
  • Posts: 215
  • Joomla! 3.9.6 - VirtueMart 3.4.2
Re: Translate : Please select an option
« Reply #5 on: January 12, 2019, 11:21:11 am »
- It's not a cache problem as I clean it regularly and use the no cache option for my browsers during development
- And yes all the products are stored in virtuemart_products_fr_fr table

By the way there's only 1 string not translated on the page. See:
https://www.cjoint.com/data/IAmkpEcmTHU_Capture-2019-01-12-à-11.14.18.jpg

I was wondering if that could be a template problem, but I tried Protostar - Default:
same problem...

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3534
  • using Matomo instead of Google Analytics
Re: Translate : Please select an option
« Reply #6 on: January 12, 2019, 11:40:30 am »
Can you post a screenshot of your custom field settings at Product [Edit] > 'Custom Fields' tab?
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

Mister Paul

  • Jr. Member
  • **
  • Posts: 215
  • Joomla! 3.9.6 - VirtueMart 3.4.2
Re: Translate : Please select an option
« Reply #7 on: January 12, 2019, 14:03:53 pm »
You pointed it:
it was a custom field named "Please select an option"

Thank you very much!
 ;)