Updated localization files with translations for recently added UI elements and messages

This commit is contained in:
Bane Stojkovic
2026-10-15 10:01:37 +02:00
parent 4916d02af6
commit 396554cbed
40 changed files with 2066 additions and 739 deletions
@@ -39,6 +39,7 @@ import org.diylc.utils.ResourceUtils;
public class LangUtil {
private static final String LANG_DIR = "lang";
private static final String PENDING_TRANSLATIONS_FILE = "pending_translations.txt";
private static final Logger LOG = Logger.getLogger(LangUtil.class);
@@ -65,7 +66,7 @@ public class LangUtil {
if (!missing.contains(text)) {
missing.add(text);
Collections.sort(missing);
try (PrintWriter out = new PrintWriter("dict.txt")) {
try (PrintWriter out = new PrintWriter(PENDING_TRANSLATIONS_FILE)) {
for (String m : missing) {
out.println(m);
}
@@ -113,7 +114,8 @@ public class LangUtil {
if (missing == null) {
missing = new ArrayList<String>();
try {
try (Stream<String> stream = Files.lines(Paths.get("dict.txt"), StandardCharsets.UTF_8)) {
try (Stream<String> stream =
Files.lines(Paths.get(PENDING_TRANSLATIONS_FILE), StandardCharsets.UTF_8)) {
stream.forEach(s -> missing.add(s));
} catch (IOException e) {
e.printStackTrace();
@@ -104,6 +104,10 @@ public class Presenter implements IPlugInPort {
private static final String ERROR_NEW = LangUtil.translate("Could not create a new file. Check the log for details.");
private static final String ERROR = LangUtil.translate("Error");
private static final String APPLY_ERROR = LangUtil.translate("Could not apply changes. Check the log for details.");
private static final String APPLY_SELECTION_ERROR =
LangUtil.translate("Could not apply changes to the selection. Check the log for details.");
private static final String GROUP_NAME_PROMPT = LangUtil.translate("Enter group name:");
private static final String GROUP_COMPONENTS = LangUtil.translate("Group Components");
private static final Logger LOG = Logger.getLogger(Presenter.class);
@@ -2118,7 +2122,7 @@ public class Presenter implements IPlugInPort {
}
// Prompt user for group name
String groupName = view.showInputDialog("Enter group name:", "Group Components");
String groupName = view.showInputDialog(GROUP_NAME_PROMPT, GROUP_COMPONENTS);
// If user cancelled, don't create the group
if (groupName == null) {
@@ -2761,8 +2765,7 @@ public class Presenter implements IPlugInPort {
}
} catch (Exception e) {
LOG.error("Could not apply selection properties", e);
view.showMessage("Could not apply changes to the selection. Check the log for details.", ERROR,
IView.ERROR_MESSAGE);
view.showMessage(APPLY_SELECTION_ERROR, ERROR, IView.ERROR_MESSAGE);
} finally {
notifyProjectModifiedIfNeeded(oldProject, "Edit Selection", true, true);
}