• Resolved LeonN1960

    (@leonn1960)


    Hi,
    I started to translate this plugin, but I experience an issue with some text strings.

    In the file includes\sp-news-post-type.php I see some strings to be translated with context (_X) but without a reference to a specific context. When I add a context it works fine, so would you be so kind to solve this issue?

    This refers to codebase lines: 13,14,15 and 24

    Best regards,
    Leon

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Riddhi Shukla

    (@ridhimashukla)

    Hello,

    Thank you for reaching us…

    We have to use this _x function to differentiate collisions with similar translatable text found in more than two places, but with different translated context like menu name.

    I have checked this plugin in my local server after translating strings manually and its working perfect. There is no need to change anything for that.

    Please check and let me know if anything.

    Thread Starter LeonN1960

    (@leonn1960)

    Hi

    That’s a bit weird. In the plugin-version I use (4.3) line 13 contains this statement:
    ‘name’ => _X(‘News’, ‘sp-news-and-widget’),

    But when I refer to the wordpress code reference it requires this:
    _x( string $text, string $context, string $domain = ‘default’ )

    So, using the _X this way it says the context is ‘sp-news-and-widget’ and that corresponds with the presentation in POedit. POedit indicates that the context is ‘sp-news-and-widget’. But the live plugin does not translate it to my language string.
    I created this language string file from the online translation strings…
    Could you please test it with the Dutch translation set?

    Plugin Support Riddhi Shukla

    (@ridhimashukla)

    Hello,

    Thank you for your update…

    I have checked twice and it’s working perfectly for the Dutch language. Please check the location of the file created in the right folder or not.

    _x( string $text, string $context, string $domain = ‘default’ )
    $text = “News”
    $context = ‘sp-news-and-widget’
    $domain = Not compulsory

    Could you please test it with the Dutch translation set?
    It’s working, I am using the loco translate plugin to do that.

    Kindly check and let me know if anything.

    Thread Starter LeonN1960

    (@leonn1960)

    Hi Riddhi,

    I dropped the translated files (.po and .mo) in this folder: \wp-content\languages\plugins\sp-news-and-widget
    And all translations work fine except for these four …

    And when I change the code it also works fine, but thats not the way to solve it.

    Any idea’s left?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Translation issue’ is closed to new replies.