1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
#!/bin/sh -e
## 01_argouml_0_14_fix.dpatch by Arnaud Vandyck <avdyk@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.
if [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
case "$1" in
-patch) patch $patch_opts -p1 < $0;;
-unpatch) patch $patch_opts -p1 -R < $0;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1;;
esac
exit 0
@DPATCH@
diff -urNad /home/arnaud/debian/avdyk/libi18n-java/libi18n-java-0.1.2/org/workingfrog/i18n/util/Translator.java libi18n-java-0.1.2/org/workingfrog/i18n/util/Translator.java
--- /home/arnaud/debian/avdyk/libi18n-java/libi18n-java-0.1.2/org/workingfrog/i18n/util/Translator.java 2003-11-20 14:58:20.000000000 +0100
+++ libi18n-java-0.1.2/org/workingfrog/i18n/util/Translator.java 2003-11-20 15:00:07.000000000 +0100
@@ -93,6 +93,26 @@
}
/**
+ * Added for backward compatibility
+ *
+ * @deprecated see {@link #localize(String,String)}
+ */
+ public static String localize (String i18nKey, Object source) {
+
+ lazyLoadBundle(validator.getBinding(i18nKey));
+
+ if (!validator.check(i18nKey)) {
+ Translator.log(validator.getReport());
+ }
+ String result = validator.getLocalizedValue();
+ if (isValidBundle(i18nKey)) {
+ return result;
+ } else {
+ return result;
+ }
+ }
+
+ /**
* Migration method : while older i18n process is still active in
* application, returns legacy values for legacy keys.
*
|