Changeset View
Changeset View
Standalone View
Standalone View
src/klocalizedstring.h
Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Line(s) | |||||
48 | /** | 48 | /** | ||
49 | * Wrap string with context for extraction. | 49 | * Wrap string with context for extraction. | ||
50 | * | 50 | * | ||
51 | * See \ref i18n_noop for use cases. | 51 | * See \ref i18n_noop for use cases. | ||
52 | */ | 52 | */ | ||
53 | #define I18NC_NOOP(context, text) context, text | 53 | #define I18NC_NOOP(context, text) context, text | ||
54 | #endif | 54 | #endif | ||
55 | 55 | | |||
56 | #ifndef I18NC_NOOP_STRIP | ||||
57 | /** | ||||
58 | * Wrap string with context for extraction, discarding context. | ||||
59 | * WARNING: this means you'll need to pass the exact same context when calling i18nc() later on. | ||||
60 | * Do not make typos... | ||||
61 | * The preferred solution is to use I18NC_NOOP and store both @p context and @p text. | ||||
62 | * I18NC_NOOP_STRIP exists for cases where storing the context is not possible. | ||||
63 | * @since 5.65 | ||||
64 | */ | ||||
65 | #define I18NC_NOOP_STRIP(context, text) text | ||||
66 | #endif | ||||
67 | | ||||
56 | #if KI18N_ENABLE_DEPRECATED_SINCE(5, 0) | 68 | #if KI18N_ENABLE_DEPRECATED_SINCE(5, 0) | ||
57 | #ifndef I18N_NOOP2 | 69 | #ifndef I18N_NOOP2 | ||
58 | /** | 70 | /** | ||
59 | * Wrap string with context for extraction, discarding context. | 71 | * Wrap string with context for extraction, discarding context. | ||
60 | * | 72 | * | ||
61 | * \deprecated Since 5.0, use \c I18NC_NOOP. | 73 | * \deprecated since 5.0, in favour of I18NC_NOOP (different API). Since 5.65, use \c I18NC_NOOP_STRIP (works exactly like I18N_NOOP2). | ||
dfaure: typo: *S*TRIP | |||||
62 | */ | 74 | */ | ||
63 | #define I18N_NOOP2(context, text) text | 75 | #define I18N_NOOP2(context, text) text | ||
64 | #endif | 76 | #endif | ||
65 | 77 | | |||
66 | #ifndef I18N_NOOP2_NOSTRIP | 78 | #ifndef I18N_NOOP2_NOSTRIP | ||
67 | /** | 79 | /** | ||
68 | * Wrap string with context for extraction. | 80 | * Wrap string with context for extraction. | ||
69 | * | 81 | * | ||
▲ Show 20 Lines • Show All 1966 Lines • Show Last 20 Lines |
typo: *S*TRIP