This thread is resolved. Here is a description of the problem and solution.
Problem:
You are working on a site under development and trying to use the Advanced Translation Editor (ATE) in WPML to translate an HTML header tag's id attribute. However, ATE does not recognize the 'test' id when you try to search for it in the translation editor.
Solution:
We recommend adding the IDs in the following format:
<h2 id="[wpml-string context='my-domain']titre-i[/wpml-string]">SECTION I</h2>
After this, you can translate the string via WPML -> String Translation. Please check the last three strings on this page.
If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. Additionally, you can open a new support ticket for further assistance here.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Tagged: ATE, Feature request
This topic contains 18 replies, has 2 voices.
Last updated by Osama Mersal 5 months, 2 weeks ago.
Assisted by: Osama Mersal.
Author | Posts |
---|---|
May 26, 2024 at 12:20 am #15670540 | |
olegA-5 |
Background of the issue: Symptoms: Questions: |
May 26, 2024 at 12:51 pm #15670963 | |
Osama Mersal Supporter
Languages: English (English ) Arabic (العربية ) Timezone: Africa/Cairo (GMT+02:00) |
Hi, Thanks for contacting WPML forums support. I'll be glad to help you today. 1) Could you please share and example of the ID you want to translate? 2) Could you please share your Debug information with me? Best regards, |
May 27, 2024 at 11:23 am #15673703 | |
olegA-5 |
The detailed specific example was in my original question, but your new system gets rid of all specifics before posting. Very sad. Here's an example: <h2 id="%D1%80%D0%D0%B0%D0%B7%D0%B4%D0%B5%D0%BB-i">РАЗДЕЛ I</h2>. WPML "sees" this string as wpml_string_wrapper: content. |
May 27, 2024 at 12:08 pm #15674083 | |
Osama Mersal Supporter
Languages: English (English ) Arabic (العربية ) Timezone: Africa/Cairo (GMT+02:00) |
Hi, 1) Thanks for your reply. Please log in to this sandbox site. (hidden link) After that, please check this page and let me know if this is the issue you face. (hidden link) 2) We would greatly appreciate it if you could share feedback about the new support wizard with us so that we can improve it. Best regards, |
May 27, 2024 at 12:42 pm #15674232 | |
olegA-5 |
Yes, I believe that is exactly what I am encountering. The string looks exactly as I have it. Like on my site, I can't translate it through ATE as it's not even detected through the search box/bar. As for wizard, I like that it essentially understands what I wrote. At least I don't see any significant misrepresentations when paraphrasing. (That's exactly how the systems I know/use work: DeepL Write and Grammarly AI Writing Assistant.) However, your wizard gets rid of a lot of details that I find fundamentally important, because often (I've written to support several times and have encountered this wizard) it's what it excludes that turns out to be important: either support explicitly asks about it (which seems logical in the proper context), or it would help support understand my questions without further clarification. So for now, I rather dislike this wizard. |
May 27, 2024 at 12:54 pm #15674251 | |
Osama Mersal Supporter
Languages: English (English ) Arabic (العربية ) Timezone: Africa/Cairo (GMT+02:00) |
Hi, 1) Thanks for your confirmation. The workarounds I found to translate this ID is to manually translate it or use the Classic Translation editor instead of ATE. I've consulted our 2nd tier support team, and I'll update you as soon as I get their reply. 2) Thanks for your feedback. Best regards, |
May 27, 2024 at 2:18 pm #15674682 | |
olegA-5 |
By manual translation, do you mean translation through the WP editor? If yes, this (as well as translation through the classic editor) is inconvenient, because this translation will disappear in case of further translation through ATE, and if you don't use ATE, you can't use the translation memory. All this causes additional inconvenience, which is already too much in WPML usage. It seems to me that html tag attributes are something that may need to be translated quite often. I've found in old tickets that some attributes are untranslatable because there is a high risk of errors (e.g. 'style'), but this is hardly the case for the 'id' attribute (at least it wasn't on the list of untranslatable attributes). I'm certainly happy to settle for a translation of the 'name' attribute of the 'a' tag, if that's easier. BTW, I don't get support response notification emails today as I always have. I use a business email account from Microsoft, I check spam folders as well, and I have no problems with receiving other email on this account today. So maybe some issues with email are on your side (although, of course, it's possible that it could be on mine). |
May 27, 2024 at 2:30 pm #15674738 | |
Osama Mersal Supporter
Languages: English (English ) Arabic (العربية ) Timezone: Africa/Cairo (GMT+02:00) |
Hi, 1) I'll update you as soon as I get our second-tier support reply, and I'll add that you want to use ATE for this case, not other workarounds, to the ticket. 2) I didn't receive any complaints from my clients today regarding the email notification, and it works correctly for me. I'll check with my team mates to know if they faced any issues with emails today. Best regards, |
May 27, 2024 at 4:27 pm #15675094 | |
olegA-5 |
I would like to make one important clarification regarding my addition about the name attribute. I can translate it through ATE, but I am not satisfied with it. I would like to get a translation (id or name attribute) that is _necessary_ from ATE's point of view. I agree to create something custom for this, to prescribe something in functions, that sort of thing. I can't rely on translation, which ATE considers only optional (and done via search-box). Because such a translation can "disappear" under a number of circumstances (it's the subject of separate tickets - under what circumstances, but I assure you that on large pages translated into dozens of languages and not being top-level pages this is very likely, as well as not saving anything that is not explicitly prescribed in the translation; WPML simply can't handle making all the changes, even if I on my side allocate huge resources and remove many restrictions in WP, apache and mysql settings). I've asked an essentially similar question before about "plain text", as in, say, strings consisting entirely of numbers. I was answered: no, no, no, no, that's not possible. But I found a way to get what I wanted with them, by adding a meaningless tag to _part_ of the string, such as: "1234<cstm>5</cstm>". Since ATE needs to figure out which part of the string to tag, it has to register such a string for mandatory translation. I can "remove" this tag if I want, i.e. make, say, "54321<cstm></cstm>", ATE allows it, because the tag is formally preserved. But I can't make such arbitrary changes in html attributes. So I'm looking for some solution that would make ATE not just see this attribute, but require it to be translated. I'm ready to "attach" the id attribute to any tag, as long as the frontend doesn't reflect it (visually). Id is great because it can be attached to almost anything. And I'm ready to do it, if it allows to require translation of this attribute. |
May 28, 2024 at 6:14 am #15676261 | |
Osama Mersal Supporter
Languages: English (English ) Arabic (العربية ) Timezone: Africa/Cairo (GMT+02:00) |
Hi, Thanks for your addition. I'll pass it on to our 2nd tier support team and ATE team. Thanks for your cooperation Best regards, |
May 28, 2024 at 8:02 am #15676652 | |
Osama Mersal Supporter
Languages: English (English ) Arabic (العربية ) Timezone: Africa/Cairo (GMT+02:00) |
Hi, Could you please tell me why you want to translate the IDs? It would be perfect if you could share the use case for translating the IDs. Thanks, |
May 28, 2024 at 10:39 am #15677771 | |
olegA-5 |
The ids that I want to translate are needed to mark the points on pages that are linked to. That is, these ids match the hashes in the slugs that are reflected in the URLs, which I have all translated, eg. /en/documents/council-of-europe/convention-for-the-protection-of-human-rights/#section-i So, I need smth like (_ _ added to post it) <_a_ name="section-i"></_a_> or <h2 id="titre-i">SECTION I</h2> |
May 28, 2024 at 11:39 am #15678103 | |
Osama Mersal Supporter
Languages: English (English ) Arabic (العربية ) Timezone: Africa/Cairo (GMT+02:00) |
Hi, Thanks for your reply. The name attribute can be translated using the search function in ATE, while the ID is not translatable. I'll wait for the 2nd tier support team's reply and update you with their findings. Best regards, |
May 29, 2024 at 8:35 am #15682133 | |
Osama Mersal Supporter
Languages: English (English ) Arabic (العربية ) Timezone: Africa/Cairo (GMT+02:00) |
Hi, Our ATE team is still checking the issue, but here is a quick workaround. Please add the IDs like the following. <h2 id="[wpml-string context='my-domain']titre-i[/wpml-string]">SECTION I</h2> After that, you can translate the string via WPML-> String Translation. Kindly check the last three strings on this page. (hidden link) Best regards, |
May 29, 2024 at 11:33 am #15683161 | |
Osama Mersal Supporter
Languages: English (English ) Arabic (العربية ) Timezone: Africa/Cairo (GMT+02:00) |
Hi, I've got the reply from our ATE team.
The case has been escalated as a feature request so we can estimate the number of clients who need this feature. Please let me know if the string translation workaround fixes the issue for you. Best regards, |