• Resolved nustefa

    (@nustefa)


    Good day!

    I am seeing an issue with the horizontal search widget date picker, which I have placed on almost every page of this website. In the primary language the date picker shows the abbreviated weekdays correctly but upon switching to the secondary language (Italian) the week days always show #! in lieu of the abbreviated week day name.

    I have done several tests and whatever language is primary or secondary, the error only show on the secondary language. The html code shows “#!” in the table of the date picker so the issue must be somewhere upstream.

    However, the in-room calendar datepicker works correctly in both languages.

    This website is based on a blank theme + Oxygen Builder + TranslatePress. Apart from this one date picker widget, everything else works fine.

    Thank you in advance for looking into this.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author e4jvikwp

    (@e4jvikwp)

    Hi,

    Thanks for your message. We’ve seen this issue before from some other of our clients that are using third-party plugins like TranslatePress to apply translations “on the fly” directly on the source code of the page.

    The issue is not caused by our plugin or by your Theme, it is just how your translation plugin handles translations. More precisely, the short version of the week-day names is handled through JavaScript code, because VikBooking uses the WordPress native jQuery UI Datepicker calendar. In this case your plugin is unable to identify a proper translation for a portion of the string “Mo” for “Monday” or “Lu” for “Lunedì”. The solution in this case is to configure your translation plugin to ignore such missing translations, or better, you can just let WordPress translate the language definitions of VikBooking through the PO/MO files. VikBooking comes with an official translation for both English and Italian, and additional translations can be downloaded through WordPress or through our websites.

    We invite you to get in touch with our technical support team through our websites for any other question. We may also speak the same language ??

    Thank you,
    The VikWP Team

    Thread Starter nustefa

    (@nustefa)

    Thanks for your reply. I tried to follow your suggestion to get in touch with the support team but I cannot log a ticket because I am using the free version, so here I am, back to you.

    Indeed I have excluded the horizontal search widget from translations with TranslatePress. This does not change the output. Primary language is ok, whatever language it is, secondary language is missing.

    I also checked the PO files I could find in the plugin files and in your website, in order to provide translations “the WordPress way”, but nowhere in the PO file can I find the English (original language) string “Mo” for Monday, “Tu” for Tuesday etc., and it looks like I should not add strings which are not taken from the plugin code.

    In the PO file we only have “Monday” or “Mon”.

    So I cannot provide a translation through the PO/MO file.

    Also, I wonder why the in-room calendar date picker works well instead, while the horizontal search form does not?

    Maybe I am missing something here. Anything else you can suggest? Thank you in advance.

    Plugin Author e4jvikwp

    (@e4jvikwp)

    Hi,

    You can always use the regular contact forms on any of our websites to get in touch with our team whenever you don’t have any active purchase.

    Anyway, just like with the native WordPress translations, in VikBooking you can find a translation for every day of the week in its full-length form as well as in the 3-char form. However, the 2-char form of every week day is missing in our plugin as well as in the WordPress official translation. This is the main reason why a plugin like TranslatePress is unable to find a matching translation for “Mo”, “Tu”, “We” etc..

    Our plugin by default uses a sub-string, a portion, of the original translation string for the full-length week day by taking the first two multi-byte characters. This works fine with any PO/MO translation for VikBooking and your language, but a plugin like TranslatePress that tries to handle translations automatically, this technique does not work. This is why we suggested to add exceptions to your plugin settings to ignore those missing translations. Alternatively, if your translation plugin allows to add custom translations, then you could manually add the missing definitions. This would be possible with any multi-language plugin based on PO/MO files.

    In order to fix this conflict with such translation plugins, the only solution for our plugin is to support a native translation for the 2-char version of every week-day, but at the moment these language definitions are not available, I’m sorry.

    Thread Starter nustefa

    (@nustefa)

    Hello, just to let you know that with the support of the TranslatePress team I was able to set the correct exception in the plugin and now everything works perfectly. Thank you as well for the quick support.

    Can you please share how you did that? What are the exceptions in TranslatePress? I literally tried everything for hours. From every selector combination possible to even strings, and it still doesn’t work.

    Info: I have the pro plugin translated via po/mo, tried to exclude the search bar in TranslatePress, but it still shows the error…

    • This reply was modified 7 months, 4 weeks ago by soareandrei.
    Thread Starter nustefa

    (@nustefa)

    The exception that I was suggested to implement excludes the whole domain of Vikbooking from the Translatepress management of gettext translations.

    In detail, had to use the ‘Exclude Gettext Strings’ option found in TranslatePress Advanced Settings > Exclude strings. That section has two input fields: ‘Gettext string’ and ‘Domain’. I only used the ‘domain’ field and entered ‘vikbooking’ in there.

    Hope this helps.

    Thank you very much!

    In the end I implemented wpml for the website + translation of vikbooking (only the frontend interface because the backend was not required in other languages) via .po and .mo files. Automatic translation via deepl api + human verification/correction.

    • This reply was modified 7 months, 3 weeks ago by soareandrei.
    • This reply was modified 7 months, 3 weeks ago by soareandrei.
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Date Picker issue with TranslatePress + Oxygen’ is closed to new replies.