Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible to rename a translated category/tag #383

Closed
milhouse1337 opened this issue May 5, 2016 · 9 comments
Closed

Impossible to rename a translated category/tag #383

milhouse1337 opened this issue May 5, 2016 · 9 comments
Labels

Comments

@milhouse1337
Copy link

Hi there,

First thank you for this excellent plugin.

I found a bug in the way categories/tags are translated. In fact it seems that the table wp_terms is just a reference to be used with the qtranslate_term_name option. Here is a screenshot of the decoded qtranslate_term_name it's basically just an array with the translations in it.

screen shot 2016-05-05 at 5 47 54 pm

The problem is that the key used to match the translation is the category name!! Why ? If the category name changes overtime the translation will never be updated because that key doesn't exist anymore.

To solve this problem, I think the key used should be the term ID. What do you think ?

I can confirm it the bug is present with the latest version of WP and qTranslate-X installed.

Thank you!

@johnclause
Copy link
Member

Category name instead of id is how WP uses it mostly. In many cases ID is not even available. I am not sure what problem you refer to. Could you list the steps to reproduce the original problem you are trying to solve?

@johnclause
Copy link
Member

Could you mention with a few words what the status is? Does it work for you now?

@milhouse1337
Copy link
Author

Here is more details. The steps:

  • You install qTranslate-X and configure 2 (or more) language, like normal.
  • You create a category for the posts named: Test-en (in english)
  • You translate it in the 2nd language: Test-fr (in french) -- using the switcher
  • You add the category like normal.
  • At this point everything is ok.

You can see in the table wp_terms that your category name is in the default language, here: Test-en. There is no [:en]...[:] tags around, because the translation is on the qtranslate_term_name as this time.

  • You click on edit and change the name to: [:fr]Test-fr-renamed[:en]Test-en-renamed[:]
  • You will now have this exact string on the wp_terms table [:fr]Test-fr-renamed[:en]Test-en-renamed[:] instead of having the category name in the default language.

Basically the category name is not consistent, the first time it's just named using the default language and if you edit it, it's wrapped with the qTranslate-X tags.

Thank you for you help!

@milhouse1337 milhouse1337 reopened this May 6, 2016
@johnclause
Copy link
Member

Are you using Raw Editor Mode? Do you see LSB on category editing page?

@johnclause
Copy link
Member

I did not try exactly your steps yet, but there was other problem #366 resently solved in https://github.com/qTranslate-Team/qtranslate-x/archive/stable.zip and maybe it took care of your problem too. Could you please try?

@johnclause
Copy link
Member

BTW, if you do not see LSB on page /wp-admin/term.php?taxonomy=xxx&tag_ID=xxx, then you did not update properly (read bold in https://qtranslatexteam.wordpress.com/2016/04/23/release-notes-3-4-6-5/).

@johnclause
Copy link
Member

Hi Pascal, @milhouse1337, Is this about your case: http://qtranslate-x.com/support/index.php?topic=396.msg2514#msg2514 too?

@milhouse1337
Copy link
Author

@johnclause Thank you for this! I will test and let you know.

@johnclause
Copy link
Member

There is a pre-release which addresses more isses with terms editing. It would be great if you could test it too.

I am closing the thread, assuming that it is resolved and to save future clicks, we can still write into closed thread or may re-open it if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants