Implemented a new setting, `getCaseFormat`, in the `ProjectSettings` interface, returning the naming convention used. Also extended corresponding implementations (`DefaultPreset`, `VueI18nPreset`, `ReactI18NextPreset`, `SettingsTestPreset`) to return `NamingConvention.CAMEL_CASE`. A new enum `NamingConvention` was created for this, with options `SNAKE_CASE` and `CAMEL_CASE`.
19 lines
369 B
Java
19 lines
369 B
Java
package de.marhali.easyi18n.settings;
|
|
|
|
import com.google.common.base.CaseFormat;
|
|
|
|
public enum NamingConvention {
|
|
SNAKE_CASE("Snake"),
|
|
CAMEL_CASE("Camel"),;
|
|
private final String name;
|
|
|
|
private NamingConvention(String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return super.name().toLowerCase();
|
|
}
|
|
}
|