translating file type extensions

Frederik Schwarzer schwarzer at kde.org
Tue Jun 13 11:14:48 BST 2023


Hi,

from a developer's point of view, what would be the best approach for file types in type selectors in file dialogs?

1) Have them translatable:
    i18n("All supported files (*.po *.pot *.xlf *.xliff *.ts)")

2) Have them mentioned:
    i18n("All supported files (%1)", "*.po *.pot *.xlf *.xliff *.ts")

3) Hide them completely from translators:
    i18n("All supported files", " (*.po *.pot *.xlf *.xliff *.ts)")

Currently I see a lot of 1) but am thinking about using 2) since it seems to reduce translation work and is also less prone to errors (translator getting the extensions wrong).

Note that in the dialog, the user only sees the "All supported files" string, so one could even argue that the rest is not a user-visible string ... But that could as well be only on my system or it might change in the future.

Anyway, is there a problem with 2) that I am currently missing?

Thanks.

Cheers,
Frederik




More information about the kde-i18n-doc mailing list