Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Openfire
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Openfire
Commits
ec477dd9
Commit
ec477dd9
authored
Oct 27, 2014
by
Dave Cridland
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #90 from akrherz/of593
OF-593 LocaleUtils: convert dots to underscores
parents
277f3f21
12ebbb9b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
LocaleUtils.java
src/java/org/jivesoftware/util/LocaleUtils.java
+6
-2
No files found.
src/java/org/jivesoftware/util/LocaleUtils.java
View file @
ec477dd9
...
@@ -474,7 +474,7 @@ public class LocaleUtils {
...
@@ -474,7 +474,7 @@ public class LocaleUtils {
if
(
locale
==
null
)
{
if
(
locale
==
null
)
{
locale
=
JiveGlobals
.
getLocale
();
locale
=
JiveGlobals
.
getLocale
();
}
}
String
i18nFile
=
pluginName
+
"_i18n"
;
String
i18nFile
=
getI18nFile
(
pluginName
)
;
// Retrieve classloader from pluginName.
// Retrieve classloader from pluginName.
final
XMPPServer
xmppServer
=
XMPPServer
.
getInstance
();
final
XMPPServer
xmppServer
=
XMPPServer
.
getInstance
();
...
@@ -511,7 +511,7 @@ public class LocaleUtils {
...
@@ -511,7 +511,7 @@ public class LocaleUtils {
public
static
ResourceBundle
getPluginResourceBundle
(
String
pluginName
)
throws
Exception
{
public
static
ResourceBundle
getPluginResourceBundle
(
String
pluginName
)
throws
Exception
{
final
Locale
locale
=
JiveGlobals
.
getLocale
();
final
Locale
locale
=
JiveGlobals
.
getLocale
();
String
i18nFile
=
pluginName
+
"_i18n"
;
String
i18nFile
=
getI18nFile
(
pluginName
)
;
// Retrieve classloader from pluginName.
// Retrieve classloader from pluginName.
final
XMPPServer
xmppServer
=
XMPPServer
.
getInstance
();
final
XMPPServer
xmppServer
=
XMPPServer
.
getInstance
();
...
@@ -525,6 +525,10 @@ public class LocaleUtils {
...
@@ -525,6 +525,10 @@ public class LocaleUtils {
return
ResourceBundle
.
getBundle
(
i18nFile
,
locale
,
pluginClassLoader
);
return
ResourceBundle
.
getBundle
(
i18nFile
,
locale
,
pluginClassLoader
);
}
}
private
static
String
getI18nFile
(
String
pluginName
)
{
return
pluginName
.
replace
(
'.'
,
'_'
)
+
"_i18n"
;
}
/**
/**
* Returns an internationalized string loaded from a resource bundle using
* Returns an internationalized string loaded from a resource bundle using
* the passed in Locale substituting the passed in arguments. Substitution
* the passed in Locale substituting the passed in arguments. Substitution
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment