Class L10nDecorator
java.lang.Object
hudson.model.Descriptor<PageDecorator>
hudson.model.PageDecorator
hudson.plugins.translation.L10nDecorator
- All Implemented Interfaces:
ExtensionPoint, Describable<PageDecorator>, Saveable, Loadable, OnMaster
PageDecorator that adds the translation dialog.- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.SelfNested classes/interfaces inherited from interface ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
FieldsFields inherited from class PageDecorator
ALLFields inherited from class Descriptor
clazz -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondecode(org.kohsuke.stapler.StaplerRequest2 request) Does the opposite ofencodeRecording(StaplerRequest2).voiddoSubmit(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp, String locale) Handles the submission from the browser, storing the contributed translations locally on this Jenkins instance.encodeRecording(org.kohsuke.stapler.StaplerRequest2 request) Encrypts the recorded resource bundle list into an opaque, tamper-proof token that round-trips through the browser.getPrimaryTranslationLocale(org.kohsuke.stapler.StaplerRequest2 req) Looks atAccept-Languageheader manually and decide which locale this user is likely capable of translating.getRecording(org.kohsuke.stapler.StaplerRequest2 request) voidstartRecording(org.kohsuke.stapler.StaplerRequest2 request) Activate the recording of the localized resources.Methods inherited from class PageDecorator
all, getDescriptor, getUrlMethods inherited from class Descriptor
addHelpFileRedirect, bindJSON, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, configure, configure, doHelp, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getStaticHelpUrl, getStaticHelpUrl, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
Field Details
-
store
-
-
Constructor Details
-
L10nDecorator
public L10nDecorator()
-
-
Method Details
-
listLocales
-
startRecording
public void startRecording(org.kohsuke.stapler.StaplerRequest2 request) Activate the recording of the localized resources. -
getRecording
-
encodeRecording
Encrypts the recorded resource bundle list into an opaque, tamper-proof token that round-trips through the browser. -
decode
Does the opposite ofencodeRecording(StaplerRequest2). -
getPrimaryTranslationLocale
Looks atAccept-Languageheader manually and decide which locale this user is likely capable of translating. -
doSubmit
public void doSubmit(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp, @QueryParameter String locale) throws IOException, jakarta.servlet.ServletException Handles the submission from the browser, storing the contributed translations locally on this Jenkins instance.- Throws:
IOExceptionjakarta.servlet.ServletException
-