Changeset View
Changeset View
Standalone View
Standalone View
docs/programmers-guide.md
Show First 20 Lines • Show All 1164 Lines • ▼ Show 20 Line(s) | |||||
1165 | all of the above is provided (`ki18n_wrap_ui`). | 1165 | all of the above is provided (`ki18n_wrap_ui`). | ||
1166 | Otherwise, one could use a shell snippet such as this: | 1166 | Otherwise, one could use a shell snippet such as this: | ||
1167 | 1167 | | |||
1168 | ~~~ | 1168 | ~~~ | ||
1169 | domain=fooapp | 1169 | domain=fooapp | ||
1170 | uifile=fooconfpage.ui | 1170 | uifile=fooconfpage.ui | ||
1171 | uihfile=$uifile.h | 1171 | uihfile=$uifile.h | ||
1172 | uic -tr tr2i18n $uifile -o $uihfile | 1172 | uic -tr tr2i18n $uifile -o $uihfile | ||
1173 | sed -i 's/tr2i18n("")/QString::null/g' $uihfile | 1173 | sed -i 's/tr2i18n("")/QString()/g' $uihfile | ||
1174 | sed -i 's/tr2i18n("", "")/QString::null/g' $uihfile | 1174 | sed -i 's/tr2i18n("", "")/QString()/g' $uihfile | ||
1175 | sed -i "1i\#define TRANSLATION_DOMAIN \"$domain\"\n#include <klocalizedstring.h>" $uihfile | 1175 | sed -i "1i\#define TRANSLATION_DOMAIN \"$domain\"\n#include <klocalizedstring.h>" $uihfile | ||
1176 | ~~~ | 1176 | ~~~ | ||
1177 | 1177 | | |||
1178 | 1178 | | |||
1179 | If strings contain KUIT markup (section \ref kuit_markup), | 1179 | If strings contain KUIT markup (section \ref kuit_markup), | ||
1180 | `tr2i18n` in the lines above should be replaced with `tr2xi18n`. | 1180 | `tr2i18n` in the lines above should be replaced with `tr2xi18n`. | ||
1181 | 1181 | | |||
1182 | <a name="link_rc"> | 1182 | <a name="link_rc"> | ||
▲ Show 20 Lines • Show All 1099 Lines • Show Last 20 Lines |