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.

This topic contains 13 replies, has 5 voices.

Last updated by jernejO 3 years, 9 months ago.

Assigned support staff: Mohamed Khafaja.

Author Posts
January 18, 2016 at 6:10 pm #790477

Javier

I am seeing many strings translated no needed that after bunch of changes on widgets from one language to another etc...

Is there a way to automatically clean up non used strings? I bet over time will not be very efficient to keep DB full of unneeded string translations.

Thanks in advance!

January 19, 2016 at 11:42 am #791058

Mohamed Khafaja
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Thank you for contacting WPML support.

If you wish to delete registered but untranslated strings you can follow the below steps:
WPML >> String Translation >> From the Select which strings to display drop down menu choose translation needed >> Select the strings >> Click Delete selected strings button.

The same can be done for strings registered under a specific domain by selecting the desired domain from the Select strings within domain drop down menu.

Note that, this will delete them from this String Tranlsation table, but you will be able to scan them back in if you need.

Please let me know if this helps.

Thank you

January 19, 2016 at 11:45 am #791063

Javier

I cannot go string by string...

What I mean is that there should be an option to rescan all strings and if some strings are not found be able to delete them. Is there such option?

Thanks

January 19, 2016 at 12:10 pm #791097

Mohamed Khafaja
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

You don't have to delete them one by one, after filtering the strings that you want to delete (by a domain or translation status) you can click on Display all results button >> Choose select all then delete.

If you want to delete all un-translated strings all you need to do is set the Select which strings to display drop down menu to Translation needed >> Click search >> Display all results button >> Select all >> Click delete selected strings button.

Thank you

January 19, 2016 at 12:13 pm #791101

Javier

I want to delete some strings that were previously translated for some plugins and now not available anymore...

Thanks!

January 19, 2016 at 1:31 pm #791225

Mohamed Khafaja
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

All you need to do is choose the domain for this specific plugin (check screenshot) >> Click on search >> Display all results button >> Select all >> Click delete selected strings button.

Now all the strings registered under this domain will not show on you string translation screen.

Thank you

January 19, 2016 at 1:50 pm #791271

Javier

You are telling me a manual way of doing it!!!! This should not be the way...

What about strings that are outdated from a plugin and you dont know which are outdated and which not??

January 19, 2016 at 3:05 pm #791367

Mohamed Khafaja
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Sorry for the inconvenience but this is the only way to delete strings for inactive/uninstalled plugins for the time being.
When exactly our developers will add this feature or not is not up-to us to determine. Each issue reported in, whether a bug or a new feature request, is taken seriously into consideration. It is given a high or low priority based on a number of factors. Factors which those with the overview of all things related are in the best position to determine.

Thank you.

January 9, 2019 at 12:27 am #3069222

jernejO

Javier, did you find a solution to this? It seems WPML support at most times just suggests what we already know, the basics. I need the same thing, to remove the OLD strings from the same domain even though they are already translated. Can't filter that. Would love a solution.

May 15, 2019 at 11:33 am #3815679

thibaultd-4

I would add a couple elements to this :

- Using domains is obvious to manage plugin translations, BUT all domains related to one plugin should be displayed as sub-elements of the plugin's name.

That way we could eventually manage/delete strings related to plugins even when their domains have obscure names. It's a real issue by the time because of those bad domain names. You can blame plugin developers, but their main work is not to be compatible with WPML. I would rather say that WPML should be far more pro-active in many ways, like this suggestion. And everyone would be much more happy!

- Offering an advanced option to detect uninstalled plugins with abandoned strings is the obvious last step here to ease the cleaning process.

> here is a related topic since 2016! : https://wpml.org/forums/topic/automatic-unused-strings-cleanup/

WPML stands as one of the most standard translation plugins for WP. Can't we hop best in class service to help us in each aspect here ?

I hope we could read about this soon now (!).

May 15, 2019 at 1:32 pm #3817071

thibaultd-4

I don't know how this ticket was set to resolved while it's not...

I have to add :
- When cleaning the string translations, it's possible to select "required translations". This will show ALL translations that are not translated, either "not translated" or "partially translated".

> Instead we should be able to select one OR both of these statuses.

- An other highly missing feature is to simply sort strings using each column, like sorting by : domain, status and other more or less useful information.
By this way it would also enhance the capability to bulk select and delete unused strings.

I think there is a good job to be done her, and while WPML team said this year that they would add some features, please ask us first what we need most. This should be a basic starting point (!!!).

Waiting to read your comprehensive involvement here.
Regards.

June 21, 2019 at 7:41 am #4065285

nicolaD-10

@thibaultd-4 i fear it's rather useless complaining, this is an long standing issue and i've lost hopes to see it solved in a realistic, smart way.

removing unused strings is one of the most suggested way to make WPML work faster, yet WPML has not yet made it realistically possible for us to handle this. one good start could be not to suck in all and any string as soon as you install any plugin, but force user to decide which ones to grab as and when s/he needs to translate it.

i'm not sure some answers have any contact with reality: "all you need to do is ... Translation needed >> Click search >> Display all results button >> Select all >> Click delete"...
try this on the 5000+ strings sucked in from WooCommerce, using WPML String Translation interface:

- you have a max 100 items to display, so you'll need to go through 50/60 pages before completing the task - also when it finishes zapping the 100 selected strings, it does not refresh the count, so at first you may think nothing has happened. you have to jump to and back another domain to see the adjourned count.

- or you can display all of them in one go and decide to be brave enough to let WPML run its deletion script over 5000+ strings: good luck to your server.

fingers crossed one day (soon, possibly) they'll come to terms with the issue, but i guess it'll have to start from some sort of admission that the issue exists, that we (paying) users have real problems with the handling of String Translation, and i have not seen any sign of it yet.

June 21, 2019 at 7:43 am #4065323

nicolaD-10

p.s. i came by here cos i'm in the process of cleaning up thousands of unneeded strings from the site, hoping some new solution was available now...

July 30, 2019 at 9:52 am #4306571

jernejO

This should be a feature for sure. Sometimes you change your i18n string settings or actual strings, add / change context etc., and all your strings stay in there, thousands of them. Very much not optimized. WPML, please do something about this.