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

solomax pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openmeetings.git


The following commit(s) were added to refs/heads/master by this push:
     new 2750706  [OPENMEETINGS-2462] some more app placeholders are restored
2750706 is described below

commit 27507065bdb9de6b406907587a02057ac0cc27a0
Author: Maxim Solodovnik <solomax...@gmail.com>
AuthorDate: Mon Sep 28 23:06:49 2020 +0700

    [OPENMEETINGS-2462] some more app placeholders are restored
---
 .../apache/openmeetings/web/app/Application.java   |  8 +--
 .../web/app/Application_ar.properties.xml          |  6 +--
 .../web/app/Application_fa.properties.xml          | 18 +++----
 .../web/app/Application_ja.properties.xml          |  2 +-
 .../web/app/Application_pt_BR.properties.xml       |  8 +--
 .../web/app/Application_sk.properties.xml          |  2 +-
 .../web/app/Application_th.properties.xml          | 14 ++---
 .../web/app/Application_uk.properties.xml          |  2 +-
 .../web/app/Application_zh_CN.properties.xml       | 10 ++--
 .../openmeetings/calendar/TestSendIcalMessage.java | 25 ---------
 .../openmeetings/web/app/TestApplication.java      | 60 ++++++++++++++++++++++
 11 files changed, 93 insertions(+), 62 deletions(-)

diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java
index 6504f6d..460d840 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java
@@ -36,7 +36,6 @@ import java.io.File;
 import java.net.UnknownHostException;
 import java.text.MessageFormat;
 import java.util.HashSet;
-import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
@@ -157,12 +156,9 @@ public class Application extends 
AuthenticatedWebApplication implements IApplica
        public static final String NAME_ATTR_KEY = "name";
        public static final String SERVER_URL_ATTR_KEY = "server.url";
        //additional maps for faster searching should be created
-       private static final Set<String> STRINGS_WITH_APP = new HashSet<>();
+       static final Set<String> STRINGS_WITH_APP = Set.of("499", "500", "506", 
"511", "512", "513", "517", "widget.start.desc"
+                       , "1151", "1155", "1157", "1158", "1194"); // package 
private for testing
        private static String appName;
-       static {
-               STRINGS_WITH_APP.addAll(List.of("499", "500", "506", "511", 
"512", "513", "517", "532", "622", "widget.start.desc"
-                               , "909", "952", "978", "981", "984", "989", 
"990", "999", "1151", "1155", "1157", "1158", "1194"));
-       }
        public static final String HASH_MAPPING = "/hash";
        public static final String SIGNIN_MAPPING = "/signin";
        public static final String NOTINIT_MAPPING = "/notinited";
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_ar.properties.xml
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_ar.properties.xml
index c78cbb6..6fea171 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_ar.properties.xml
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_ar.properties.xml
@@ -200,11 +200,11 @@ see https://openmeetings.apache.org/LanguageEditor.html 
for Details
        <entry key="506"><![CDATA[تسجيل {0}]]></entry>
        <entry key="507"><![CDATA[بياناتك:]]></entry>
        <entry key="511"><![CDATA[فريق - {0}]]></entry>
-       <entry key="512"><![CDATA[إنشاء حساب OpenMeeting]]></entry>
-       <entry key="513"><![CDATA[إعادة ضبط كلمة مرور - OpenMeeting]]></entry>
+       <entry key="512"><![CDATA[إنشاء حساب {0}]]></entry>
+       <entry key="513"><![CDATA[إعادة ضبط كلمة مرور - {0}]]></entry>
        <entry key="514"><![CDATA[انقر على هذا الرابط من أجل إدخال كلمة مرور 
جديدة:]]></entry>
        <entry key="515"><![CDATA[انقر على هنا من أجل إدخال كلمة مرور 
جديدة]]></entry>
-       <entry key="517"><![CDATA[إعادة ضبط كلمة مرور الموقع]]></entry>
+       <entry key="517"><![CDATA[إعادة ضبط كلمة مرور الموقع{0}]]></entry>
        <entry key="524"><![CDATA[محمي عن طريق كلمة مرور]]></entry>
        <entry key="526"><![CDATA[مدة الصلاحية]]></entry>
        <entry key="527"><![CDATA[أبدي]]></entry>
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_fa.properties.xml
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_fa.properties.xml
index 66932d2..55e82fc 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_fa.properties.xml
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_fa.properties.xml
@@ -190,21 +190,21 @@ see https://openmeetings.apache.org/LanguageEditor.html 
for Details
        <entry key="442"><![CDATA[حذف سرور]]></entry>
        <entry key="482"><![CDATA[شرکت کنندگان]]></entry>
        <entry key="498"><![CDATA[هماهنگ کننده در این اتاق نیست، اما تعدادی 
شرکت کننده وجود دارد. شما باید درخواست هماهنگ کننده دهید یا صبر کنید.]]></entry>
-       <entry key="499"><![CDATA[بازخورد]]></entry>
-       <entry key="500"><![CDATA[دعوت]]></entry>
+       <entry key="499"><![CDATA[{0} بازخورد]]></entry>
+       <entry key="500"><![CDATA[دعوت {0}]]></entry>
        <entry key="501"><![CDATA[پیام از کاربر:]]></entry>
        <entry key="502"><![CDATA[پیام:]]></entry>
        <entry key="503"><![CDATA[با کلیک بر روی لینک زیر در کنفرانس شرکت 
کنید]]></entry>
        <entry key="504"><![CDATA[كنيد كليك را اينجا اطاق به ورود 
براي]]></entry>
        <entry key="505"><![CDATA[اگر با مسیر ارتباطی مشکلی دارید لطفا لینک را 
کپی کرده و آنرا در مرورگر خود اجرا کنید:]]></entry>
-       <entry key="506"><![CDATA[جزییات حساب کاربری]]></entry>
+       <entry key="506"><![CDATA[جزییات حساب کاربری {0}]]></entry>
        <entry key="507"><![CDATA[جزییات حساب کاربری شما:]]></entry>
        <entry key="511"><![CDATA[تیم-{0}]]></entry>
-       <entry key="512"><![CDATA[جزییات حساب کاربری شما]]></entry>
+       <entry key="512"><![CDATA[{0}جزییات حساب کاربری شما]]></entry>
        <entry key="513"><![CDATA[تنظیم دوباره رمز عبور-{0}]]></entry>
        <entry key="514"><![CDATA[بر روی این لینک کلیک کنیدتا رمز جدید را وارد 
کنید:]]></entry>
        <entry key="515"><![CDATA[برای ورود رمز جدید ایجا را کلیک 
کنید]]></entry>
-       <entry key="517"><![CDATA[تنظیم دوباره رمز عبور]]></entry>
+       <entry key="517"><![CDATA[تنظیم دوباره رمز عبور{0} ]]></entry>
        <entry key="524"><![CDATA[رمز عبور حفاظت شده است]]></entry>
        <entry key="526"><![CDATA[دوره اعتبار]]></entry>
        <entry key="527"><![CDATA[پایان ناپذیر]]></entry>
@@ -360,14 +360,14 @@ see https://openmeetings.apache.org/LanguageEditor.html 
for Details
        <entry key="1143"><![CDATA[منطقه زمانی]]></entry>
        <entry key="1146"><![CDATA[توضیح]]></entry>
        <entry key="1147"><![CDATA[ایجاد شده توسط]]></entry>
-       <entry key="1151"><![CDATA[کنفرانس جدید:]]></entry>
+       <entry key="1151"><![CDATA[کنفرانس جدید: {0}]]></entry>
        <entry key="1152"><![CDATA[جزییات:]]></entry>
        <entry key="1153"><![CDATA[شروع:]]></entry>
        <entry key="1154"><![CDATA[پایان:]]></entry>
-       <entry key="1155"><![CDATA[کنفرانس تغییر یافته:]]></entry>
+       <entry key="1155"><![CDATA[کنفرانس تغییر یافته: {0}]]></entry>
        <entry key="1156"><![CDATA[سازمان دهنده:]]></entry>
-       <entry key="1157"><![CDATA[کنفرانس کنسل شد:]]></entry>
-       <entry key="1158"><![CDATA[یادآوری کننده کنفرانس:]]></entry>
+       <entry key="1157"><![CDATA[کنفرانس کنسل شد: {0}]]></entry>
+       <entry key="1158"><![CDATA[یادآوری کننده کنفرانس: {0}]]></entry>
        <entry key="1159"><![CDATA[تنظیمات گروه]]></entry>
        <entry key="1160"><![CDATA[نمایش داده تماس  به همه]]></entry>
        <entry key="1162"><![CDATA[پیشنهادات من]]></entry>
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_ja.properties.xml
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_ja.properties.xml
index 9619c10..3c13bba 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_ja.properties.xml
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_ja.properties.xml
@@ -954,7 +954,7 @@ see https://openmeetings.apache.org/LanguageEditor.html for 
Details
        <entry key="wb.tool.white-out"><![CDATA[White-Out]]></entry>
        <entry key="widget.recent.desc"><![CDATA[あなたが最近開設した会議室を表示します。]]></entry>
        <entry key="widget.recent.title"><![CDATA[最近の会議室]]></entry>
-       <entry 
key="widget.start.desc"><![CDATA[ウェブ会議プラットホーム「オープン・ミーティングス」<br>たった4ステップでウェブ会議を始められます。<br>カレンダーでウェブ会議の予定を作成することもできます。]]></entry>
+       <entry 
key="widget.start.desc"><![CDATA[ウェブ会議プラットホーム{0}<br>たった4ステップでウェブ会議を始められます。<br>カレンダーでウェブ会議の予定を作成することもできます。]]></entry>
        <entry key="widget.start.header"><![CDATA[使用方法:]]></entry>
        <entry key="widget.start.title"><![CDATA[さあ始めましょう]]></entry>
        <entry key="wizard.button.finish"><![CDATA[インストール]]></entry>
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_pt_BR.properties.xml
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_pt_BR.properties.xml
index 6b8a811..c92fb43 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_pt_BR.properties.xml
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_pt_BR.properties.xml
@@ -199,12 +199,12 @@ see https://openmeetings.apache.org/LanguageEditor.html 
for Details
        <entry key="505"><![CDATA[se você tiver problemas com o link, por favor 
copie e cole isso no seu browser:]]></entry>
        <entry key="506"><![CDATA[{0} Inscrição]]></entry>
        <entry key="507"><![CDATA[Seus dados:]]></entry>
-       <entry key="511"><![CDATA[TVQWEB - Equipe]]></entry>
-       <entry key="512"><![CDATA[TVQWEB - Inscrição]]></entry>
-       <entry key="513"><![CDATA[TVQWEB - Redefinição de Senha]]></entry>
+       <entry key="511"><![CDATA[{0} - Equipe]]></entry>
+       <entry key="512"><![CDATA[{0} - Inscrição]]></entry>
+       <entry key="513"><![CDATA[{0} - Redefinição de Senha]]></entry>
        <entry key="514"><![CDATA[Clique neste link para criar uma nova 
senha:]]></entry>
        <entry key="515"><![CDATA[Click aqui para criar umanova senha]]></entry>
-       <entry key="517"><![CDATA[TVQWEB - Redefinição de Senha]]></entry>
+       <entry key="517"><![CDATA[{0} - Redefinição de Senha]]></entry>
        <entry key="524"><![CDATA[Proteger com senha]]></entry>
        <entry key="526"><![CDATA[Período de validade]]></entry>
        <entry key="527"><![CDATA[Final]]></entry>
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_sk.properties.xml
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_sk.properties.xml
index d6d91bc..219cff9 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_sk.properties.xml
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_sk.properties.xml
@@ -204,7 +204,7 @@ see https://openmeetings.apache.org/LanguageEditor.html for 
Details
        <entry key="513"><![CDATA[{0} - Reset Password]]></entry>
        <entry key="514"><![CDATA[Kliknite na tento link pre zadanie nového 
hesla]]></entry>
        <entry key="515"><![CDATA[Kliknite sem pre zadanie nového 
hesla]]></entry>
-       <entry key="517"><![CDATA[Reset hesla]]></entry>
+       <entry key="517"><![CDATA[{0} Reset hesla]]></entry>
        <entry key="524"><![CDATA[Chránené heslom]]></entry>
        <entry key="526"><![CDATA[Validačná doba]]></entry>
        <entry key="527"><![CDATA[Nekonečné]]></entry>
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_th.properties.xml
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_th.properties.xml
index c85fafe..5efb9d2 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_th.properties.xml
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_th.properties.xml
@@ -190,21 +190,21 @@ see https://openmeetings.apache.org/LanguageEditor.html 
for Details
        <entry key="442"><![CDATA[ลบเซิร์ฟเวอร์-บันทึกการแชท]]></entry>
        <entry key="482"><![CDATA[ผู้เข้าร่วม]]></entry>
        <entry key="498"><![CDATA[ผู้ดำเนินรายการออกจากห้องไปแล้ว 
แต่มีผู้เข้าร่วมบางรายอยู่ 
คุณต้องสมัครเพื่อทำหน้าที่ดำเนินรายการหรือรอ]]></entry>
-       <entry key="499"><![CDATA[ผลตอบรับการประชุมแบบเปิด]]></entry>
-       <entry key="500"><![CDATA[การประชุมแบบเปิด – คำเชิญ]]></entry>
+       <entry key="499"><![CDATA[ผลตอบรับ{0}]]></entry>
+       <entry key="500"><![CDATA[{0} – คำเชิญ]]></entry>
        <entry key="501"><![CDATA[ข้อความจากผู้ใช้]]></entry>
        <entry key="502"><![CDATA[ข้อความ]]></entry>
        <entry key="503"><![CDATA[คลิกลิงค์นี้เพื่อเข้าร่วมการประชุม]]></entry>
        <entry key="504"><![CDATA[คลิกที่นี่เพื่อเข้าห้อง]]></entry>
        <entry key="505"><![CDATA[หากมีปัญหากับลิงค์นี้ 
โปรดคัดลอกลิงค์นี้แล้วนำไปวางที่เบราวเซอร์:]]></entry>
-       <entry key="506"><![CDATA[ลงทะเบียนการประชุมแบบเปิด]]></entry>
+       <entry key="506"><![CDATA[ลงทะเบียน{0}]]></entry>
        <entry key="507"><![CDATA[ข้อมูลผู้ใช้ของคุณ:]]></entry>
-       <entry key="511"><![CDATA[การประชุมแบบเปิด - ทีม]]></entry>
-       <entry key="512"><![CDATA[ลงทะเบียนการประชุมแบบเปิด]]></entry>
-       <entry key="513"><![CDATA[การประชุมแบบเปิด - ตั้งรหัสผ่านใหม่]]></entry>
+       <entry key="511"><![CDATA[{0} - ทีม]]></entry>
+       <entry key="512"><![CDATA[ลงทะเบียน{0}]]></entry>
+       <entry key="513"><![CDATA[{0} - ตั้งรหัสผ่านใหม่]]></entry>
        <entry key="514"><![CDATA[คลิกลิงค์นี้เพื่อกรอกรหัสผ่านใหม่:]]></entry>
        <entry key="515"><![CDATA[คลิกที่นี่เพื่อกรอกรหัสผ่านใหม่]]></entry>
-       <entry key="517"><![CDATA[การประชุมแบบเปิด ตั้งรหัสผ่านใหม่]]></entry>
+       <entry key="517"><![CDATA[{0} ตั้งรหัสผ่านใหม่]]></entry>
        <entry key="524"><![CDATA[ป้องกันรหัสผ่านแล้ว]]></entry>
        <entry key="526"><![CDATA[ระยะเวลาที่ใช้การได้]]></entry>
        <entry key="527"><![CDATA[ไม่จำกัด]]></entry>
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_uk.properties.xml
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_uk.properties.xml
index 872284b..abbba32 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_uk.properties.xml
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_uk.properties.xml
@@ -190,7 +190,7 @@ see https://openmeetings.apache.org/LanguageEditor.html for 
Details
        <entry key="442"><![CDATA[Стерти лог чату серверу]]></entry>
        <entry key="482"><![CDATA[Учасники]]></entry>
        <entry key="498"><![CDATA[Немає модератора в даній кімнаті, але є 
учасники. Ви можете стати модератором або чекати]]></entry>
-       <entry key="499"><![CDATA[Зворотній зв'язок {0}]]></entry>
+       <entry key="499"><![CDATA[Зворотній зв''язок {0}]]></entry>
        <entry key="500"><![CDATA[{0} - Запрошення]]></entry>
        <entry key="501"><![CDATA[Повідомлення для користувачів:]]></entry>
        <entry key="502"><![CDATA[Повідомлення:]]></entry>
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_zh_CN.properties.xml
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_zh_CN.properties.xml
index b41fff4..8210324 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_zh_CN.properties.xml
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_zh_CN.properties.xml
@@ -360,14 +360,14 @@ see https://openmeetings.apache.org/LanguageEditor.html 
for Details
        <entry key="1143"><![CDATA[时区]]></entry>
        <entry key="1146"><![CDATA[详细描述]]></entry>
        <entry key="1147"><![CDATA[创建者]]></entry>
-       <entry key="1151"><![CDATA[新会议:]]></entry>
+       <entry key="1151"><![CDATA[新会议: {0}]]></entry>
        <entry key="1152"><![CDATA[详细情况]]></entry>
        <entry key="1153"><![CDATA[开始时间:]]></entry>
        <entry key="1154"><![CDATA[结束时间:]]></entry>
-       <entry key="1155"><![CDATA[会议变更:]]></entry>
+       <entry key="1155"><![CDATA[会议变更: {0}]]></entry>
        <entry key="1156"><![CDATA[主持人:]]></entry>
-       <entry key="1157"><![CDATA[会议取消:]]></entry>
-       <entry key="1158"><![CDATA[会议提醒:]]></entry>
+       <entry key="1157"><![CDATA[会议取消: {0}]]></entry>
+       <entry key="1158"><![CDATA[会议提醒: {0}]]></entry>
        <entry key="1159"><![CDATA[社区设置]]></entry>
        <entry key="1160"><![CDATA[联系信息对于任何人都可见]]></entry>
        <entry key="1162"><![CDATA[供职单位]]></entry>
@@ -392,7 +392,7 @@ see https://openmeetings.apache.org/LanguageEditor.html for 
Details
        <entry key="1191"><![CDATA[拒绝]]></entry>
        <entry key="1192"><![CDATA[您好,]]></entry>
        <entry key="1193"><![CDATA[想把您添加为联系人.]]></entry>
-       <entry key="1194"><![CDATA[检查您的联系人请求消息,通过点击链接来接受或者拒绝请求]]></entry>
+       <entry key="1194"><![CDATA[检查您的联系人请求消息 {0},通过点击链接来接受或者拒绝请求]]></entry>
        <entry key="1196"><![CDATA[联系人列表]]></entry>
        <entry key="1198"><![CDATA[已经确认了您的请求!]]></entry>
        <entry key="1202"><![CDATA[来自]]></entry>
diff --git 
a/openmeetings-web/src/test/java/org/apache/openmeetings/calendar/TestSendIcalMessage.java
 
b/openmeetings-web/src/test/java/org/apache/openmeetings/calendar/TestSendIcalMessage.java
index 6b72e3b..958db62 100644
--- 
a/openmeetings-web/src/test/java/org/apache/openmeetings/calendar/TestSendIcalMessage.java
+++ 
b/openmeetings-web/src/test/java/org/apache/openmeetings/calendar/TestSendIcalMessage.java
@@ -19,10 +19,6 @@
 package org.apache.openmeetings.calendar;
 
 import static java.util.UUID.randomUUID;
-import static 
org.apache.openmeetings.util.OpenmeetingsVariables.getApplicationName;
-import static 
org.apache.openmeetings.util.OpenmeetingsVariables.setApplicationName;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
@@ -31,11 +27,7 @@ import java.util.Calendar;
 import java.util.Date;
 import java.util.GregorianCalendar;
 import java.util.List;
-import java.util.Locale;
 import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Random;
-import java.util.stream.Collectors;
 
 import javax.activation.DataHandler;
 import javax.mail.BodyPart;
@@ -49,7 +41,6 @@ import javax.mail.internet.MimeMultipart;
 
 import org.apache.openmeetings.AbstractJUnitDefaults;
 import org.apache.openmeetings.core.mail.MailHandler;
-import org.apache.openmeetings.db.dao.label.LabelDao;
 import org.apache.openmeetings.util.mail.ByteArrayDataSource;
 import org.apache.openmeetings.util.mail.IcalHandler;
 import org.junit.jupiter.api.Test;
@@ -238,20 +229,4 @@ class TestSendIcalMessage extends AbstractJUnitDefaults {
                // Transport trans = session.getTransport("smtp");
                Transport.send(mimeMessage);
        }
-
-       @Test
-       void testTeamLbl() {
-               final String newAppName = "AAAAA";
-               final String prevAppName = getApplicationName();
-               try {
-                       setApplicationName(newAppName);
-                       List<Locale> locales = 
LabelDao.getLanguages().stream().map(Entry::getValue).collect(Collectors.toList());
-                       Locale l = locales.get(new 
Random().nextInt(locales.size()));
-                       final String str = app.getOmString("511", l);
-                       assertNotNull(str);
-                       assertTrue(str.contains(newAppName));
-               } finally {
-                       setApplicationName(prevAppName);
-               }
-       }
 }
diff --git 
a/openmeetings-web/src/test/java/org/apache/openmeetings/web/app/TestApplication.java
 
b/openmeetings-web/src/test/java/org/apache/openmeetings/web/app/TestApplication.java
new file mode 100644
index 0000000..415d78c
--- /dev/null
+++ 
b/openmeetings-web/src/test/java/org/apache/openmeetings/web/app/TestApplication.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") +  you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.openmeetings.web.app;
+
+import static 
org.apache.openmeetings.util.OpenmeetingsVariables.getApplicationName;
+import static 
org.apache.openmeetings.util.OpenmeetingsVariables.setApplicationName;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import java.util.List;
+import java.util.Locale;
+import java.util.Map.Entry;
+import java.util.stream.Collectors;
+
+import org.apache.openmeetings.AbstractJUnitDefaults;
+import org.apache.openmeetings.db.dao.label.LabelDao;
+import org.junit.jupiter.api.Test;
+
+public class TestApplication extends AbstractJUnitDefaults {
+       @Test
+       void testMissing() {
+               assertEquals("[Missing]", app.getOmString("909", 
Locale.ENGLISH));
+       }
+
+       @Test
+       void testLblWithApp() {
+               final String newAppName = "AAAAA";
+               final String prevAppName = getApplicationName();
+               try {
+                       setApplicationName(newAppName);
+                       List<Locale> locales = 
LabelDao.getLanguages().stream().map(Entry::getValue).collect(Collectors.toList());
+                       for (Locale l : locales) {
+                               for (String key : Application.STRINGS_WITH_APP) 
{
+                                       final String str = app.getOmString(key, 
l);
+                                       assertNotNull(str, "Label with key '" + 
key + "' for locale " + l + " should exist");
+                                       assertTrue(str.contains(newAppName), 
"Label with key '" + key + "' for locale " + l + " is invalid: " + str);
+                               }
+                       }
+               } finally {
+                       setApplicationName(prevAppName);
+               }
+       }
+}

Reply via email to