@Override protected String toInternalCode (LocaleId standardCode) { return standardCode.toPOSIXLocaleId(); }
private void processStartDocument (Event event) { try { StartDocument sd = (StartDocument)event.getResource(); // Create the output createWriter(sd); // Writer header writer.write("# "+linebreak); if ( forExtractMerge ) { writer.write("# This file is intended to be merged back. "+linebreak); writer.write("# Please preserve the msgctxt lines and the order of the entries."+linebreak); writer.write("# "+linebreak); } writer.write("msgid \"\""+linebreak); writer.write("msgstr \"\""+linebreak); writer.write("\"Content-Type: text/plain; charset="+encoding+"\\n\""+linebreak); writer.write("\"Content-Transfer-Encoding: 8bit\\n\""+linebreak); writer.write("\"Language: "+language.toPOSIXLocaleId()+"\\n\""+linebreak); writer.write("\"Plural-Forms: "+PluralForms.getExpression(language)); writer.write("\\n\""+linebreak+linebreak); crumbs = CRUMBS_PREFIX; } catch ( IOException e ) { throw new OkapiIOException("Error writing the header.", e); } }
private String makeTargetPath (MergingInfo item) { String ex = Util.getExtension(item.getRelativeInputPath()); String sd = Util.getDirectoryName(item.getRelativeInputPath()); String fn = Util.getFilename(item.getRelativeInputPath(), false); return manifest.getTempSourceDirectory() + ( sd.isEmpty() ? "" : sd + "/" ) + fn + "_" + manifest.getTargetLocale().toPOSIXLocaleId() + ex + ".po"; }
if ( srcLoc.toPOSIXLocaleId().equals(localeId) ) { return false; else if ( trgLoc.toPOSIXLocaleId().equals(localeId) ) { if ( trgLoc.toPOSIXLocaleId().equals(localeId) ) {
data[1], trgLoc.toPOSIXLocaleId()); data[0], trgLoc.toPOSIXLocaleId());
options.getServerWithoutAPI() + "projects/p/" + options.getProjectId() + "/language/"+manifest.getSourceLocale().toPOSIXLocaleId()+"/", resourceFile)); report.writeRawXML(String.format("<td>%s</td></tr>", info.getRelativeInputPath()));