Skip to content

Commit ba7c98c

Browse files
committed
Added default extension to translation resource
1 parent e521158 commit ba7c98c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/org/javawebstack/framework/WebApplication.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ public WebApplication(){
129129
}
130130

131131
public void addTranslation(Locale locale, ClassLoader classLoader, String resource){
132+
if(!resource.endsWith(".json"))
133+
resource += ".json";
132134
try {
133135
GraphElement element = GraphElement.fromJson(IO.readTextResource(classLoader, resource));
134136
if(element.isObject())

0 commit comments

Comments
 (0)