-
Notifications
You must be signed in to change notification settings - Fork 80
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
Strings unused, yet still translatable #379
Comments
The way to find unused strings would be to:
That will open a pane with all the unused strings. There's then a quick fix button to remove all the unused strings. This will also remove unused strings from the translated files. The inspection is not perfect and says some used strings are unused. So I went over all of the removed strings, added them back one by one and pressed Alt+F7 on each. Some of the strings were indeed used and I could find usages in either XML or Java files. For others, I couldn't find any usages so I removed them. Running the inspection again, will only find 6 unused strings but they are false flags and have usages. I also kept a string I used in #363. In case there is a need to restore any of the strings, here's how I would do it:
That will put all the removed strings in staging. I would then undo all the changes and only keep the string I need. |
I'll have a look |
I see #386 is already there. We are close to solve this 😄 |
This is to be done in Android Studio, right? So I could do it as well.
Great. |
Yes. You can do it too. You can also access the menu from "Code > Analyze Code > Run Inspection by Name". |
The problem
There are a few strings available to translate, although they are no longer used in the UI.
Examples
See these, for instance.
Possible causes
I suspect that these strings fell in oblivion with successive changes of the program.
I have working on the translation of Primitive FTPd for some releases now, so I remember seeing some of the unused strings in the values.xml back when they were used; namely, when the user interface had a three-dot menu, instead of the current tabbed bar.
Possible solutions
Erase unused strings and update all translations with the changes.
The text was updated successfully, but these errors were encountered: