Hi, thanks for your support but the code looks good to me. What’s wrong?
hi,
i wrote … strings was never translated, we use german formal as site-language
i mean this is not right:
__( ‘Continue: %s’, ‘sgr-nextpage-titles’ )
should be:
__( ‘Continue:’, ‘sgr-nextpage-titles’ ) . ‘ %s’
in your code the string __(‘Continue: htmllinkstringpart’) was never found and never replaced/ translated, in our case the german string for ‘continue’ > ‘weiter’ was not shown.
‘Back to: %s’ issue is the same
i hope you understand me.
Ok! Sorry for misunderstanding. So the problem is not the plugin but that nobody is working at the german translation. If you think you can contribute translating this you can ask the polyglot community to add you as a translator editor:
https://make.ww.wp.xz.cn/polyglots/handbook/rosetta/roles-and-capabilities/pte-request/#pte-request-by-a-plugintheme-author
This is the Multipage translations page:
https://translate.ww.wp.xz.cn/locale/de/default/wp-plugins/sgr-nextpage-titles/
Thanks.
@sgr33n Sorry, but you misunderstood. The code indeed is wrong. Have a close look at the first comment: The ‘%s’ has been moved outside the translation.
We have a new 1.5 version, is the code changed?
No, it is still the same.
Ok, so I don’t think I can understand what’s the problem, can you try to explain again? Unfortunately I don’t remember why I changed that string but there was a reason for sure.
Okay, I’ll try. In mpp-template.php there is this code:
$text = sprintf( __( 'Continue: %s', 'sgr-nextpage-titles' ), $link );
$text = sprintf( __( 'Back to: %s', 'sgr-nextpage-titles' ), $link );
So the strings to be translated are:
'Continue: %s'
'Back to: %s'
But in sgr-nextpage-titles.pot there are only (also note the trailing whitespace):
msgid "Back to: "
msgstr ""
and:
msgid "Continue:"
msgstr ""
So as far as I understand the po translation system, it is not possible to provide a proper translation for the two strings – even if the German translation would be maintained.
One way to solve this would be to move the %s out of the translatable string, as the initial poster did. Another way would be to fix the sgr-nextpage-titles.pot file so that it includes the %s.
Or am I misunderstanding the po translation system?
It’s clear now (I hope) 🙂
So the only way is that you provide a correct translation via the WordPress translate system, then we can ask a Global translator editor to approve our new translations. Unfortunately WordPress has no other way to replace them.
Actually, when you reported this to me, I already translated the string, as you can see here:
https://translate.ww.wp.xz.cn/projects/wp-plugins/sgr-nextpage-titles/stable/de/default/?filters%5Bterm%5D=Continue%3A+%25s&filters%5Buser_login%5D=&filters%5Bstatus%5D=either&filter=Filter&sort%5Bby%5D=priority&sort%5Bhow%5D=desc
Then I asked on the German forum to make me PTE to approve german translations, but they said me that since I was not a German motherlanguage they would not approve me:
https://make.ww.wp.xz.cn/polyglots/2019/11/04/pte-request-for-multipage-plugin/#comment-285364
So, if you want, you can ask them to make you PTE, please take me updated about this.
Cheers,
Sergio
Okay, I’ve applied. The request is pending.