You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2019/07/10 09:17:04 UTC

[tomcat] branch 8.5.x updated: Align with master - i18n improvements

This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
     new dcdd1aa  Align with master - i18n improvements
dcdd1aa is described below

commit dcdd1aaef899b950df27821f32fdab9bfc5628fa
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Jul 10 10:16:40 2019 +0100

    Align with master - i18n improvements
---
 java/org/apache/naming/LocalStrings.properties    | 2 +-
 java/org/apache/naming/LocalStrings_fr.properties | 6 ++++--
 java/org/apache/naming/LocalStrings_ja.properties | 4 +++-
 java/org/apache/naming/StringManager.java         | 5 ++++-
 4 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/java/org/apache/naming/LocalStrings.properties b/java/org/apache/naming/LocalStrings.properties
index 062fd4c..952aaae 100644
--- a/java/org/apache/naming/LocalStrings.properties
+++ b/java/org/apache/naming/LocalStrings.properties
@@ -22,7 +22,7 @@ namingContext.contextExpected=Name is not bound to a Context
 namingContext.failResolvingReference=Unexpected exception resolving reference
 namingContext.invalidName=Name is not valid
 namingContext.nameNotBound=Name [{0}] is not bound in this Context. Unable to find [{1}].
-namingContext.noAbsoluteName=Can''t generate an absolute name for this namespace
+namingContext.noAbsoluteName=Cannot generate an absolute name for this namespace
 namingContext.readOnly=Context is read only
 
 selectorContext.methodUsingName=Call to method [{0}] with a Name of [{1}]
diff --git a/java/org/apache/naming/LocalStrings_fr.properties b/java/org/apache/naming/LocalStrings_fr.properties
index b7bc794..33dd57d 100644
--- a/java/org/apache/naming/LocalStrings_fr.properties
+++ b/java/org/apache/naming/LocalStrings_fr.properties
@@ -18,11 +18,13 @@ contextBindings.noContextBoundToThread=Aucun Contexte de nommage lié à ce thre
 contextBindings.unknownContext=Nom de Contexte inconnu : [{0}]
 
 namingContext.alreadyBound=Le Nom [{0}] est déjà lié à ce Contexte
-namingContext.contextExpected=Le Nom n''est pas lié à un Contexte
+namingContext.contextExpected=Le Nom n'est pas lié à un Contexte
 namingContext.failResolvingReference=Une erreur s est produite durant la résolution de la référence
 namingContext.invalidName=Le Nom est invalide
 namingContext.nameNotBound=Le Nom [{0}] n''est pas lié à ce Contexte
 namingContext.noAbsoluteName=Impossible de générer un nom absolu pour cet espace de nommage (namespace)
 namingContext.readOnly=Le Contexte est en lecture seule
 
-selectorContext.noJavaUrl=Ce Contexte doit être accédé par une java: URL
+selectorContext.methodUsingName=Appel de la méthode [{0}] avec le nom [{1}]
+selectorContext.methodUsingString=Appel de la méthode [{0}] avec la String [{1}]
+selectorContext.noJavaUrl=Ce Contexte doit être accédé par une URL commençant par 'java:'
diff --git a/java/org/apache/naming/LocalStrings_ja.properties b/java/org/apache/naming/LocalStrings_ja.properties
index 79bbf34..f976573 100644
--- a/java/org/apache/naming/LocalStrings_ja.properties
+++ b/java/org/apache/naming/LocalStrings_ja.properties
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-contextBindings.noContextBoundToCL=名前付けコンテキストはこのクラスローダにバインドされていません
+contextBindings.noContextBoundToCL=Naming Contextはこのクラスローダにバインドされていません
 contextBindings.noContextBoundToThread=名前付けコンテキストはこのスレッドにバインドされていません
 contextBindings.unknownContext=未知のコンテキスト名です: [{0}]
 
@@ -25,4 +25,6 @@ namingContext.nameNotBound=名前 [{0}] はこのコンテキストにバイン
 namingContext.noAbsoluteName=この名前空間に絶対名を生成できません
 namingContext.readOnly=コンテキストはリードオンリーです
 
+selectorContext.methodUsingName=オブジェクト名 [{1}] に対してメソッド [{0}] を呼び出します。
+selectorContext.methodUsingString=メソッド[{0}]を[{1}]の文字列で呼び出します。
 selectorContext.noJavaUrl=このコンテキストにはjava: URLを用いてアクセスされねばいけません
diff --git a/java/org/apache/naming/StringManager.java b/java/org/apache/naming/StringManager.java
index 5e36c1a..8e9922d 100644
--- a/java/org/apache/naming/StringManager.java
+++ b/java/org/apache/naming/StringManager.java
@@ -110,7 +110,10 @@ public class StringManager {
         String str = null;
 
         try {
-            str = bundle.getString(key);
+            // Avoid NPE if bundle is null and treat it like an MRE
+            if (bundle != null) {
+                str = bundle.getString(key);
+            }
         } catch(MissingResourceException mre) {
             //bad: shouldn't mask an exception the following way:
             //   str = "[cannot find message associated with key '" + key + "' due to " + mre + "]";


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org