Fixes and changes to Lokalize, request for feedback
Karl Ove Hufthammer
karl at huftis.org
Sat Aug 3 11:09:19 BST 2024
Emir SARI skreiv 03.08.2024 00:19:
>> Yes, HTML text is annoying. But I find that the colouring of the HTML tags very useful to distinguish markup from (often translatable) text.
> Colouring is nice, but something like easy keyboard navigation between strings to translate would be invaluable in terms of saving time.
I think implementing something like this wouldn’t be *too* difficult
(that is, for someone familiar with C++, Qt and Lokalize’s codebase…).
Basically, one would just have to create an action that skips to the
next piece of text matching the regular expression ‘>\w’ (a > character
followed by a an alphanumeric character).
BTW, are you familiar with the keyboard shortcuts ‘Ctrl+M’ and ‘Ctrl+T’
in Lokalize?
Ctrl+M: Insert next tag Ctrl+T: Insert tag (with the next selected as
the default)
A ‘tag’ is here an HTML tag (including attributes), but also other
placeholders, like %1. This is very useful when editing strings with HTML.
>>> 6. Option to disable automatic completion. Never use it. Slows me a lot.
>> This has been implemented since February 2010, just a few months after the autocompletion feature was first implemented (https://bugs.kde.org/show_bug.cgi?id=227399). I don’t use the feature (found it annoying) and have always had it disabled.
> How do we disable it?
Settings → Configure Lokalize → Editing → Minimum word length for word
completion
Set this to the minimum value, 2 (which changes to text to ‘Disable word
completion’). It’s not very intuitive, but it is explained in the
tooltip for this option.
>> An option to ignore tags could be useful, but, personally, I sometimes find it useful to search for (if not *in* HTML tags).
> I was recently changing all the single and double quotes and the other ASCII characters with their Unicode equivalents, and it is really hard to automate it with the HTML tags in equation.
I see that there already is a ‘Skip markup’ option in the ‘Find’ dialog.
However, it doesn’t seem to actually work (or I haven’t understood what
it’s supposed to do).
But be careful in trying to automate this anyway. There are some cases
where the quotes have special meaning. For example, dolphin.po has this
string:
'One Week Ago' (MMMM, yyyy)
And the context marker says:
@title:group Date: MMMM is full month name in current locale, and yyyy
is full year number. You must keep the ' don't use any fancy " or « or
similar. The ' is not shown to the user, it's there to mark a part of
the text that should not be formatted as a date
So one would have to manually check each replacement.
--
Karl Ove Hufthammer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-i18n-doc/attachments/20240803/4ff8b9dd/attachment.htm>
More information about the kde-i18n-doc
mailing list