Skip to content

Commit

Permalink
Change requirement to max 3 characters for language tag
Browse files Browse the repository at this point in the history
  • Loading branch information
kalaspuffar committed Nov 15, 2017
1 parent 1613b44 commit 8a39f0d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/adobe/epubcheck/opf/OPFChecker30.java
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ private void checkLanguage() {
for(Metadata metadata : dcLanguageMetas)
{
Locale l = Locale.forLanguageTag(metadata.getValue());
if (l == null || l.getLanguage().length() > 2) {
if (l == null || l.getLanguage().length() > 3) {
report.message(MessageId.OPF_086, EPUBLocation.create(path), metadata.getValue());
}
else if (!l.getVariant().isEmpty())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -617,8 +617,6 @@ public void testIssue702()

@Test
public void testIssue615_langtag() {
Collections.addAll(expectedErrors, MessageId.OPF_086);

testValidateDocument("valid/issue615-langtags/");
}

Expand Down

0 comments on commit 8a39f0d

Please sign in to comment.