diff options
author | Vincent Reher <tde@4reher.org> | 2022-05-16 14:20:25 -0700 |
---|---|---|
committer | Vincent Reher <tde@4reher.org> | 2022-05-16 14:20:25 -0700 |
commit | 9bafd9a3d6505685508efe549c9f6f4d81663a7f (patch) | |
tree | 3d32787a110406e69708dfbf55de42394bd5e4b0 | |
parent | 8d440849f9a214fa76db6f98186cda7072dfdd88 (diff) | |
download | tdebase-issue/252.tar.gz tdebase-issue/252.zip |
Corrections to some libkonq header files:issue/252
1. Made konq_sort_constants.h more translation-friendly
2. Removed unimplemented case in konq_string_compare.h
Signed-off-by: Vincent Reher <tde@4reher.org>
-rw-r--r-- | libkonq/konq_sort_constants.h | 34 | ||||
-rw-r--r-- | libkonq/konq_string_compare.h | 11 |
2 files changed, 27 insertions, 18 deletions
diff --git a/libkonq/konq_sort_constants.h b/libkonq/konq_sort_constants.h index c58d3cb30..df1094674 100644 --- a/libkonq/konq_sort_constants.h +++ b/libkonq/konq_sort_constants.h @@ -8,28 +8,34 @@ enum { UNICODE_UNMODIFIED = 0, LOCALE_UNMODIFIED = 1, UNICODE_CASEINSENSITIVE = 2, - LOCALE_MODIFIED = 3 } TextSortOrders; #define LOCALE_DEFAULT LOCALE_UNMODIFIED -// We define these UI text items once to used in different places +/* + We define the following UI text items once to be used in different places + FIXME: if this "define once, use many" concept turns out to be unnecessary, + these macros should be removed and references to them should be updated + accordingly. +*/ -#define LABEL_UNICODE_UNMODIFIED "&Unicode based" -#define LABEL_UNICODE_CASEINSENSITIVE "Unicode based, &case insensitive" -#define LABEL_LOCALE_UNMODIFIED "&Locale Order" -#define LABEL_LOCALE_MODIFIED "Locale Order - &Improved" +#include <tdelocale.h> -#define LABEL_DIRECTORIES_FIRST "&Directories displayed before non-directories" -#define LABEL_HIDDEN_FIRST "&Hidden displayed before non-hidden" +#define LABEL_UNICODE_UNMODIFIED I18N_NOOP("&Unicode based") +#define LABEL_UNICODE_CASEINSENSITIVE I18N_NOOP("Unicode based, &case insensitive") +#define LABEL_LOCALE_UNMODIFIED I18N_NOOP("&Locale Order") +#define LABEL_LOCALE_MODIFIED I18N_NOOP("Locale Order - &Improved") -#define TOOLTIP_UNICODE_UNMODIFIED "Strict numeric Unicode codepoint order" -#define TOOLTIP_UNICODE_CASEINSENSITIVE "Like above but with lower/upper case ASCII letters adjacent" -#define TOOLTIP_LOCALE_UNMODIFIED "Locale-defined order, usually \"friendly\"" -#define TOOLTIP_LOCALE_MODIFIED "Locale-defined order with enhancements" +#define LABEL_DIRECTORIES_FIRST I18N_NOOP("&Directories displayed before non-directories") +#define LABEL_HIDDEN_FIRST I18N_NOOP("&Hidden displayed before non-hidden") -#define TOOLTIP_DIRECTORIES_FIRST "Group directories before non-directories" -#define TOOLTIP_HIDDEN_FIRST "Group hidden before non-hidden" +#define TOOLTIP_UNICODE_UNMODIFIED I18N_NOOP("Strict numeric Unicode codepoint order") +#define TOOLTIP_UNICODE_CASEINSENSITIVE I18N_NOOP("Like above but with lower/upper case ASCII letters adjacent") +#define TOOLTIP_LOCALE_UNMODIFIED I18N_NOOP("Locale-defined order, usually \"friendly\"") +#define TOOLTIP_LOCALE_MODIFIED I18N_NOOP("Locale-defined order with enhancements") + +#define TOOLTIP_DIRECTORIES_FIRST I18N_NOOP("Group directories before non-directories") +#define TOOLTIP_HIDDEN_FIRST I18N_NOOP("Group hidden before non-hidden") #endif // KONQ_SORT_CONSTANTS_H diff --git a/libkonq/konq_string_compare.h b/libkonq/konq_string_compare.h index 50682e418..ee96c7056 100644 --- a/libkonq/konq_string_compare.h +++ b/libkonq/konq_string_compare.h @@ -42,17 +42,18 @@ static inline int stringCompare( return a.localeAwareCompare( b ); break; - case LOCALE_MODIFIED: + /* + case LOCALE_CASEINSENSITIVE: /* - * Reserved for future "improvement" to LOCALE_UNMODIFIED. - * Current implementation reproduces effect that the legacy + * Unimplemented case would reproduce effect that the legacy * option "Case Insensitive Sort" previously had on listviews. * It has subtle but undesirable side effects for the en_US * locale and probably other locales. For example: while * 'a' will sort just before 'A', 'ā' will sort just AFTER 'Ā'. - */ + * / return a.lower().localeAwareCompare( b.lower() ); break; + */ default: // Treat as UNICODE_UNMODIFIED return a.compare( b ); @@ -92,6 +93,8 @@ functions that are called many times when sorting: The above 2 functions will need to remain in place until iconview is retrofitted with user interface and code to bring it up to par with listview. +Please leave this comment in this header until above changes have been made. + */ #endif // KONQ_STRING_COMPARE_H |