Merge commit 'refs/pull/196/head' of github.com:marhali/easy-i18n into next

This commit is contained in:
marhali 2022-12-07 19:03:56 +01:00
commit 892453aabd

View File

@ -1,6 +1,7 @@
package de.marhali.easyi18n.io; package de.marhali.easyi18n.io;
import com.intellij.codeInsight.actions.ReformatCodeProcessor; import com.intellij.codeInsight.actions.ReformatCodeProcessor;
import com.intellij.openapi.components.PathMacroManager;
import com.intellij.openapi.editor.Document; import com.intellij.openapi.editor.Document;
import com.intellij.openapi.fileEditor.FileDocumentManager; import com.intellij.openapi.fileEditor.FileDocumentManager;
import com.intellij.openapi.project.Project; import com.intellij.openapi.project.Project;
@ -57,7 +58,8 @@ public class IOHandler {
* @throws IOException Could not read translation data * @throws IOException Could not read translation data
*/ */
public @NotNull TranslationData read() throws IOException { public @NotNull TranslationData read() throws IOException {
String localesPath = this.settings.getLocalesDirectory(); String localesPath = PathMacroManager.getInstance(project)
.expandPath(this.settings.getLocalesDirectory());
if(localesPath == null || localesPath.isEmpty()) { if(localesPath == null || localesPath.isEmpty()) {
throw new EmptyLocalesDirException("Locales path must not be empty"); throw new EmptyLocalesDirException("Locales path must not be empty");