Skip to content

Commit

Permalink
Merge pull request #210 from jonesbusy/feature/move-appearance
Browse files Browse the repository at this point in the history
Move configuration to appearance
  • Loading branch information
jonesbusy authored May 9, 2024
2 parents f011655 + df831e9 commit 4606fdb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ you're using have been translated into the specified language).
To additionally force this language on all users, overriding their browser language,
you can check the "Ignore browser preference and force this language to all users" option.

JCasC is supported on all version after 1.4
JCasC configuration example:

```
unclassified:
appearance:
locale:
systemLocale: en
ignoreAcceptLanguage: true
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/hudson/plugins/locale/PluginImpl.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package hudson.plugins.locale;

import com.thoughtworks.xstream.XStream;
import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.Extension;
import hudson.Util;
import hudson.XmlFile;
Expand All @@ -11,7 +12,9 @@
import java.io.File;
import java.util.Locale;
import javax.servlet.ServletException;
import jenkins.appearance.AppearanceCategory;
import jenkins.model.GlobalConfiguration;
import jenkins.model.GlobalConfigurationCategory;
import jenkins.model.Jenkins;
import net.sf.json.JSONObject;
import org.jenkinsci.Symbol;
Expand Down Expand Up @@ -125,6 +128,12 @@ public static Locale parse(String s) {
}
}

@NonNull
@Override
public GlobalConfigurationCategory getCategory() {
return GlobalConfigurationCategory.get(AppearanceCategory.class);
}

private static final XStream XSTREAM = new XStream2();

static {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
unclassified:
appearance:
locale:
systemLocale: fr
ignoreAcceptLanguage: true

0 comments on commit 4606fdb

Please sign in to comment.