Notifications
Clear all

[Solved] The problem with the translation of the phrase. Please fix it!

41 Posts
4 Users
6 Reactions
1,984 Views
Posts: 104
Topic starter
(@adler11)
Estimable Member
Joined: 3 years ago

By the way, "wpDiscuz" has exactly the same problem!!! 😉 

Tutrix
Posts: 1323
(@tutrix)
Noble Member
Joined: 4 years ago

I see the same here > https://wpforo.ru/

14 Replies
(@adler11)
Joined: 3 years ago

Estimable Member
Posts: 104

@tutrix,

wpForo.ru - not a standard. There are the same problems. And, at the time, they corrected some mistakes in translation much later than I corrected them.

RealAct
(@realact)
Joined: 6 years ago

Reputable Member
Posts: 222

@adler11 I have sort of the same issue on my Spanish forum. I posted here a couple of years ago, and I could never find a solution to the issue. If you translate the phrase "% Reply" it changes it in two places, in English is fine, but in Spanish and other languages you need two different phrases for that.

I was lucky to find a neutral word in Spanish that works kind of the same way as "Reply" in English with the word "Respuesta" which is what I use now, but it still doesn't sound very natural.

I have attached a screenshot showing where the issue occurs. In #1 I need it to be "Respuesta/s" (Just same usage as in English) however in #2 I need it to be "Responder" and I can't. Because if I change it then it looks perfect in #2, but it totally makes no sense in #1 when I do change it to "Responder".

Sorry for having hijacked this thread, but maybe it helps, so the devs see there are some customers with this issue.

(@adler11)
Joined: 3 years ago

Estimable Member
Posts: 104

@realact,

Welcome to our club, my friend! 😀 

(@adler11)
Joined: 3 years ago

Estimable Member
Posts: 104

@tutrix,

And this is also WRONG! More forums - more people will see the error 🙂

Tutrix
(@tutrix)
Joined: 4 years ago

Noble Member
Posts: 1323

@adler11 

This is the PHP code that is used

 <?php ( $topic['answers'] > 1 ) ? printf( wpforo_phrase('%d Answers', false), $topic['answers'] ) : printf( wpforo_phrase('%d Answer', false), $topic['answers'] ) ; ?>

so you have to translate Answers and Answer correctly

%d Answers and Answer not only %s Replies

(@adler11)
Joined: 3 years ago

Estimable Member
Posts: 104

@tutrix 

Here it is (see screenshot)?

Tutrix
(@tutrix)
Joined: 4 years ago

Noble Member
Posts: 1323

@adler11 

and when you insert the translation, it is not displayed?

(@adler11)
Joined: 3 years ago

Estimable Member
Posts: 104

@tutrix 

I tried it (see the screenshot). There is no reaction. This is not what is needed.

(@adler11)
Joined: 3 years ago

Estimable Member
Posts: 104

@tutrix,

Reacts, just, to "Replies".

Tutrix
(@tutrix)
Joined: 4 years ago

Noble Member
Posts: 1323

@adler11 

oh sorry you are right, i was in the wrong layout 😦 

Tutrix
(@tutrix)
Joined: 4 years ago

Noble Member
Posts: 1323

@adler11

try, translate directly in code (layout 4 post.php Line 112)

<?php ( $reply_count == 1 ) ? wpforo_phrase('Reply') : wpforo_phrase('Replies'); ?></span>

example

<?php ( $reply_count == 1 ) ? wpforo_phrase('translation') : wpforo_phrase('translation'); ?></span>

edit > layout 4

(@adler11)
Joined: 3 years ago

Estimable Member
Posts: 104

@tutrix,

Yes, I found it and corrected it. And this has already allowed me to make the translation EXACTLY in the place I need, regardless of the phrase on the main page of the forum. Half the work is done! But this solution, unfortunately, is half-hearted. Can you tell me how to swap the number (number of replies) and the word "Replies"? That would be a complete solution to the problem (in my particular case)! See screenshot:

RealAct
(@realact)
Joined: 6 years ago

Reputable Member
Posts: 222

@tutrix Thanks bud, I tried that, but then it changes on the top, which I don't need it to because in there it is correct in Spanish, but not on the actual post "Reply" icon.

See my screenshot changing in the code like you explained changes #1 in my case I need to change #2 ONLY.

RealAct
(@realact)
Joined: 6 years ago

Reputable Member
Posts: 222

I think I have found the line and word where I need to change it. But if I change "reply" there for the word I need, then no word is displayed on the forum and only the vote icon shows up, the actual word next to the voting or reply icons which should be the word for Reply I want to replace disappears.

Robert
Posts: 10526
Admin
(@robert)
Support Team
Joined: 8 years ago

There are three phrases and you should use theme. There are no other phrases for different number of replies, they are only designed for singular and plural. They can be edited in wpForo > Phrases admin page:

  • %s Replies
  • Replies
  • Reply
1 Reply
(@adler11)
Joined: 3 years ago

Estimable Member
Posts: 104

@robert,

It's a pity if this is the final answer. Because in many cases (for example, mine and RealAct) translations into our native languages look childishly ridiculous and cause confusion and questions from forum visitors, they say, is it really impossible to fix these minor flaws? It turns out that it is IMPOSSIBLE, because the THEME!

Posts: 104
Topic starter
(@adler11)
Estimable Member
Joined: 3 years ago

Thank you to everyone who participated in the discussion of the topic! I was able, with the invaluable help of a very positive and responsive person, Tutrix, to find a way out of the situation. Made changes to the file post.php:

112                        <span class="wpf-post-replies-title"><?php ( $reply_count == 1 ) ? wpforo_phrase('Ответ') : wpforo_phrase('Ответов:'); ?></span>
113                        <span class="wpf-post-replies-count"><?php echo wpforo_print_number($reply_count); ?></span>
Posts: 104
Topic starter
(@adler11)
Estimable Member
Joined: 3 years ago

As we can see, lines 112 and 113 have been swapped, a colon has been added. In my particular case, this solved the problem. Maybe it will help someone too. Thank you all!

10 Replies
Robert
Admin
(@robert)
Joined: 8 years ago

Support Team
Posts: 10526

@adler11,

You can use (add if they don't exist) the following phrases, the value of these phrase can be changed by relocating the %s part, %s will show the number of replies:

  • Phrase key: %s Replies  | Phrase Value: Replies %s
  • Phrase key: %s Reply    | Phrase Value: Reply %s

 

They'll work fine in the upcoming version, because the two lines you've mentioned have been changed to one line:

<span class="wpf-post-replies-title"><?php ( (int) $reply_count > 1 ) ? printf( wpforo_phrase('%s Replies', false), wpforo_print_number($reply_count) ) : printf( wpforo_phrase('%s Reply', false), wpforo_print_number($reply_count) ); ?></span>

 

(@adler11)
Joined: 3 years ago

Estimable Member
Posts: 104

@robert,

Thank you for the answer! I did all this before asking for help, but the main problem was that the phrase change was happening in two places at the SAME time!!! First:

(@adler11)
Joined: 3 years ago

Estimable Member
Posts: 104
(@adler11)
Joined: 3 years ago

Estimable Member
Posts: 104

@robert,

You have an error in the code! See the screenshot:

Robert
Admin
(@robert)
Joined: 8 years ago

Support Team
Posts: 10526

@adler11,

I don't see any error there.

(@adler11)
Joined: 3 years ago

Estimable Member
Posts: 104

@robert,

In line 104, please correct "1" to "2"! Then the problem with a single number of posts will disappear. I checked on myself. Works. See the screenshot:

Robert
Admin
(@robert)
Joined: 8 years ago

Support Team
Posts: 10526

@adler11,

This was updated in the core and at the wordpress.org plugin directory.

(@adler11)
Joined: 3 years ago

Estimable Member
Posts: 104

@robert,

👍 👍 👍 

RealAct
(@realact)
Joined: 6 years ago

Reputable Member
Posts: 222

@robert Thanks for looking into this, it's hard to explain what the issue is, but based on your interest in this topic, I'm hopeful that we will find a solution. I pasted a little table below where I try to explain what my particular issue is, which I believe is pretty similar to @adler11's issue. 

Code

Spanish

English

Outcome in Spanish

% Replies

% Respuestas

How many replies

OK

Replies

Respuestas

Just the word “Replies”

OK

Reply

Respuesta

Just the word “Reply”

OK

X

Responder

The act of “Replying to”

MISSING STRING

I will also be uploading it as a graphic, just in case. As you can see, the word "Reply" in English is used to #1 meaning the act of actually replying to someone or #2 just plain and simple the word "Reply". With just one word, you can express two different things. 

In Spanish and probably other languages, however, that is NOT the case. The ACT OF REPLYING TO someone or something utilizes yet another word.

To kind of solve the issue on my forum I have used the word "Respuesta" which means "Reply" in Spanish and sort of also implies "To Reply To" but it's not very natural or clear to the Spanish reader. To truly solve my issue with the right translation I would need yet another string which I could translate as "Responder" but I can't at the moment because that string doesn't exist.

Hopefully this helps clarify the issue and not bring more confusion into it.

Thanks taking the time of looking into this.

RealAct
(@realact)
Joined: 6 years ago

Reputable Member
Posts: 222

To fix my issue I would need to be able to change the word "reply" on code line 81 to "Responder" but if I go ahead and change it, then no word shows up at all on the forum pages next to the "Reply" icon because the string that I want and placed there doesn't exist.

I also cannot create a new one, because it's the same word that already exists in with the string "reply"🤣. Yeah my head hurts trying to explain this.

Page 3 / 3