Skip to content

Commit

Permalink
Added missing i18n resource package in Gluon pom.xml files
Browse files Browse the repository at this point in the history
  • Loading branch information
salmonb committed Nov 21, 2023
1 parent b18e700 commit 4150e84
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
13 changes: 12 additions & 1 deletion src/main/java/dev/webfx/cli/core/ProjectModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ default ReusableStream<String> getResourcePackages() { // Direct calls: 1) DevGw
getExplicitResourcePackages(),
getMetaResourcePackage(),
getSourcesRootConfigResourcePackage(),
getI18nResourcePackage(),
getWebFxModuleFile().areResourcePackagesAutomaticallyExported() ? getFileResourcePackages() : ReusableStream.empty()
).distinct();
}
Expand Down Expand Up @@ -135,9 +136,19 @@ default ReusableStream<String> getSourcesRootConfigResourcePackage() {
return ReusableStream.of(SourcesConfig.SRC_ROOT_CONF_PACKAGE);
}

String I18N_RESOURCE_FOLDER = "dev/webfx/stack/i18n";
String I18N_PACKAGE = I18N_RESOURCE_FOLDER.replace('/', '.');

default ReusableStream<String> getI18nResourcePackage() {
Path i18nFolderPath = getMainResourcesDirectory().resolve(I18N_RESOURCE_FOLDER);
if (!isExecutable() || !TextFileReaderWriter.fileExists(i18nFolderPath))
return ReusableStream.empty();
return ReusableStream.of(I18N_PACKAGE);
}

default ReusableStream<String> getI18nResources() {
Path mainResourcesDirectory = getMainResourcesDirectory();
Path i18nFolderPath = mainResourcesDirectory.resolve("dev/webfx/stack/i18n");
Path i18nFolderPath = mainResourcesDirectory.resolve(I18N_RESOURCE_FOLDER);
if (!isExecutable() || !TextFileReaderWriter.fileExists(i18nFolderPath))
return ReusableStream.empty();
return ReusableStream.create(() -> SplitFiles.uncheckedWalk(i18nFolderPath, 1))
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/dev/webfx/cli/version/dev/version.ini
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version=0.1.0-SNAPSHOT
build.timestamp=2023-10-08 10:38
build.timestamp=2023-11-21 12:56

0 comments on commit 4150e84

Please sign in to comment.