parent
d66cf3595e
commit
bf1338ffa0
@ -3,13 +3,16 @@
|
||||
# easy-i18n Changelog
|
||||
|
||||
## [Unreleased]
|
||||
### Fixed
|
||||
- NullPointerException on key completion
|
||||
- Changelog handling in release flow
|
||||
### Added
|
||||
- Support for json based arb files (flutter)
|
||||
|
||||
### Changed
|
||||
- Updated plugin dependencies
|
||||
|
||||
### Fixed
|
||||
- NullPointerException on key completion
|
||||
- Changelog handling in release flow
|
||||
|
||||
## [1.6.0]
|
||||
### Added
|
||||
- The search function now supports full-text-search
|
||||
|
@ -29,7 +29,8 @@ import java.util.function.Consumer;
|
||||
public class DataStore {
|
||||
|
||||
private static final Set<IOStrategy> STRATEGIES = new LinkedHashSet<>(Arrays.asList(
|
||||
new JsonIOStrategy(), new ModularizedJsonIOStrategy(),
|
||||
new JsonIOStrategy("json"), new ModularizedJsonIOStrategy("json"),
|
||||
new JsonIOStrategy("arb"), new ModularizedJsonIOStrategy("arb"),
|
||||
new YamlIOStrategy("yaml"), new YamlIOStrategy("yml"),
|
||||
new PropertiesIOStrategy()
|
||||
));
|
||||
|
@ -27,10 +27,14 @@ import java.util.function.Consumer;
|
||||
* @author marhali
|
||||
*/
|
||||
public class JsonIOStrategy implements IOStrategy {
|
||||
|
||||
private static final String FILE_EXTENSION = "json";
|
||||
private static final Gson GSON = new GsonBuilder().setPrettyPrinting().disableHtmlEscaping().create();
|
||||
|
||||
private final String FILE_EXTENSION;
|
||||
|
||||
public JsonIOStrategy(@NotNull String fileExtension) {
|
||||
this.FILE_EXTENSION = fileExtension;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canUse(@NotNull Project project, @NotNull String localesPath, @NotNull SettingsState state) {
|
||||
VirtualFile directory = LocalFileSystem.getInstance().findFileByIoFile(new File(localesPath));
|
||||
|
@ -33,9 +33,14 @@ import java.util.function.Consumer;
|
||||
*/
|
||||
public class ModularizedJsonIOStrategy implements IOStrategy {
|
||||
|
||||
private static final String FILE_EXTENSION = "json";
|
||||
private static final Gson GSON = new GsonBuilder().setPrettyPrinting().disableHtmlEscaping().create();
|
||||
|
||||
private final String FILE_EXTENSION;
|
||||
|
||||
public ModularizedJsonIOStrategy(@NotNull String fileExtension) {
|
||||
this.FILE_EXTENSION = fileExtension;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canUse(@NotNull Project project, @NotNull String localesPath, @NotNull SettingsState state) {
|
||||
VirtualFile directory = LocalFileSystem.getInstance().findFileByIoFile(new File(localesPath));
|
||||
|
Loading…
x
Reference in New Issue
Block a user