The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Search
Close
AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Translation for lab...
 
Share:
Notifications
Clear all

[Solved] Translation for labels "Post Comment" and "COMMENTS" on frontend

2 Posts
2 Users
0 Reactions
9,928 Views
Posts: 1
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@osmanybg84)
New Member
Joined: 5 years ago
[#604]

I translated wpdiscuz using PO files and loco translate plugin. The result can bee seen on the 1st attachment "before.png": I could translate almost everything except for the labels "Post Comment" and "COMMENTS".

I made two changes adding two call the __() function on the followind files:

1- /wp-content/plugins/wpdiscuz/forms/wpdFormAttr/Field/DefaultField/Submit.php - ln:100

from: <input id="wpd-field-submit-<?php echo esc_attr($uniqueId); ?>" class="wc_comm_submit wpd_not_clicked wpd-prim-button" type="submit" name="<?php echo esc_attr($name); ?>" value="<?php echo esc_attr($args["name"]); ?>" />

to: <input id="wpd-field-submit-<?php echo esc_attr($uniqueId); ?>" class="wc_comm_submit wpd_not_clicked wpd-prim-button" type="submit" name="<?php echo esc_attr($name); ?>" value="<?php echo __(esc_attr($args["name"])); ?>" />

 

2- /home1/cronicas/public_html/wp-content/plugins/wpdiscuz/themes/default/comment-form.php - ln:333

from: echo "<span class='wpdtc'>" . esc_html($commentsCount) . "</span> " . esc_html(1 == $commentsCount ? $form->getHeaderTextSingle() : $form->getHeaderTextPlural());

to: echo "<span class='wpdtc'>" . esc_html($commentsCount) . "</span> " . __(esc_html(1 == $commentsCount ? $form->getHeaderTextSingle() : $form->getHeaderTextPlural()));

 

After these changes the labels were successfully transtaled as shown int he 2nd image "after.png".

Maybe these changes can be applied on the next update or somewhere else if the texts on those points were expected to be already translated.


1 Reply
Asti
Posts: 8210
 Asti
Support
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@asti)
Illustrious Member
Joined: 8 years ago

Hi @osmanybg84,

Please navigate to Dashboard > wpDiscuz > Forms admin page, edit the Default Form, then find and edit the "Post Comment (Submit Button)" button and change the value of the "Name" field. More info here:  https://wpdiscuz.com/docs/wpdiscuz-documentation/getting-started/custom-comment-form/comment-form-builder/#edit_and_delete_fields

On the same page find the following two fields and change the values as you like:

  • Comment form header text (singular)
  • Comment form header text (plural)

More info here: https://wpdiscuz.com/docs/wpdiscuz-7/getting-started/manage-comment-forms/comment-form-settings/#comment_form_header_text


Share: