Skip to content

Commit 2d41e7e

Browse files
committed
Extracted "lang" attribute from <html>
1 parent 0cc6286 commit 2d41e7e

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

src/com/maxprograms/converters/Constants.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ private Constants() {
2121

2222
public static final String TOOLID = "OpenXLIFF";
2323
public static final String TOOLNAME = "OpenXLIFF Filters";
24-
public static final String VERSION = "5.0.0";
25-
public static final String BUILD = "20260307_1906";
24+
public static final String VERSION = "5.0.1";
25+
public static final String BUILD = "20260310_1837";
2626

2727
public static final String SUCCESS = "0";
2828
public static final String ERROR = "1";

src/com/maxprograms/converters/html/Html2Xliff.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ private static void writeHeader() throws IOException {
166166
}
167167

168168
private static void processList(Segmenter segmenter)
169-
throws IOException, SAXException, ParserConfigurationException {
169+
throws IOException, SAXException, ParserConfigurationException {
170170
for (int i = 0; i < segments.size(); i++) {
171171
String text = segments.get(i);
172172
if (isTranslateable(text)) {
@@ -179,7 +179,7 @@ private static void processList(Segmenter segmenter)
179179
}
180180

181181
private static void extractSegment(Segmenter segmenter, String seg)
182-
throws IOException, SAXException, ParserConfigurationException {
182+
throws IOException, SAXException, ParserConfigurationException {
183183

184184
// start by making a smaller list
185185

@@ -793,6 +793,9 @@ private static void updateAttributes(String type, String fragment) {
793793
if (atts.containsKey("placeholder")) {
794794
translatables.add("placeholder");
795795
}
796+
if (atts.containsKey("lang") && "html".equalsIgnoreCase(type)) {
797+
translatables.add("lang");
798+
}
796799
if (!translatables.isEmpty()) {
797800
translatableAttributes.put(type.toLowerCase(), translatables);
798801
} else {

0 commit comments

Comments
 (0)