/** * For manual invocations - see {@link GenerateTranslationFilesImpl}. */ public ToolingProxytoysI18nizer(final GeneratorResults genRes, final Locale locale, final TranslationService translationService) { this(genRes, translationService, new FixedLocaleProvider(locale)); }
/** * @deprecated since 5.4.4. You might still use this constructor if you need support for i18nBasename but the basename support will be removed in a future version. Use {@link #MessagesWrapper(java.util.Locale, info.magnolia.i18nsystem.TranslationService)} instead. */ @Deprecated MessagesWrapper(String basename, Locale locale, TranslationService translationService) { this.translationService = translationService; this.localeProvider = new FixedLocaleProvider(locale); this.basename = basename; }
private LocaleProvider newFixedLocaleProvider(final Locale locale) { return new FixedLocaleProvider(locale); }
@Override protected ProxytoysI18nizer newI18nizer() { return new ProxytoysI18nizer(new TestTranslationService(), new FixedLocaleProvider(new Locale("de", "CH"))); }
@Before public void setup() { i18nizer = new ProxytoysI18nizer(mock(TranslationService.class), new FixedLocaleProvider(Locale.ITALIAN)); actionDefinition = new TestI18nAbleActionDefinition(); actionDefinition.setName("myaction"); appDescriptor = new ConfiguredAppDescriptor(); appDescriptor.setName("myapp"); Map<String, SubAppDescriptor> subappDescriptors = new HashMap<>(); ConfiguredSubAppDescriptor subappDescriptor = new ConfiguredSubAppDescriptor(); subappDescriptor.setName("browser"); Map<String, ActionDefinition> actions = new HashMap<>(); actions.put("1", actionDefinition); subappDescriptor.setActions(actions); subappDescriptors.put("1", subappDescriptor); appDescriptor.setSubApps(subappDescriptors); }