Skip to content

Allow for more explicit button labels

Felix Ernst requested to merge felixernst/dolphin:explicit_labels into master

The basic idea is that I want to very explicitly communicate to users which items they act on when pressing a button. The button shouldn't just say "Delete" because the user might not know what exactly is going to be deleted. The button should say "Delete 'itemName'" and similarly be as explicit as possible for any combination of items. Unfortunately being explicit seems to make either a huge amount of translation or a translation puzzle necessary. The current state of this MR contains the translation puzzle approach. @teams/localization

(Part of my work towards !273 (merged))


This commit allows us to very explicitly refer to any set of items in text. This way buttons don't need to be labeled generically like "Permanently Delete" but can be enriched to be labeled "Permanently Delete "FileName"" or "Copy 7 Selected Folders" or "Copy 6 Files" or "Rename "file1", "file2", "file3", "file4" and "folder5"".

This commit tries to save translators a lot of work by using a translation puzzle. This might be problematic for some languages. The alternative on the other hand would mean that any label which wants to be explicit would need to have over 10 translations just for one label which seems quite bad as well.

A fallback is to be implemented for languages that can't really accommodate for any specific word puzzle. This is explained in the documentation.

Edited by Felix Ernst

Merge request reports