]> git.ipfire.org Git - thirdparty/cups-filters.git/commitdiff
Braille: Support new table metadata
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Fri, 18 Mar 2022 11:52:31 +0000 (12:52 +0100)
committerGitHub <noreply@github.com>
Fri, 18 Mar 2022 11:52:31 +0000 (12:52 +0100)
Liblouis 3.21 introduced +language: and +region: metadata fields, so let
us support them as well.

Pull request #453

filter/braille/filters/cups-braille.sh.in

index 47fda21a8995390101bf6b15336c0d1c03a59c32..37f315f7167eb3253481ae5dcabb27f57d615804 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2015-2018 Samuel Thibault <samuel.thibault@ens-lyon.org>
+# Copyright (c) 2015-2018, 2022 Samuel Thibault <samuel.thibault@ens-lyon.org>
 # 
 # Permission is hereby granted, free of charge, to any person obtaining a copy
 # of this software and associated documentation files (the "Software"), to deal
@@ -356,9 +356,15 @@ getOptionLibLouis () {
       if grep -q "^#+locale:$LOUIS_LOCALE$" $table; then
        printf "DEBUG: %s has correct locale %s\n" "$name" "$LOUIS_LOCALE" >&2
        score=$((score + 15))
+      elif grep -q "^#+region:$LOUIS_LOCALE$" $table; then
+       printf "DEBUG: %s has correct region %s\n" "$name" "$LOUIS_LOCALE" >&2
+       score=$((score + 15))
       elif grep -q "^#+locale:$LANGUAGE$" $table; then
        printf "DEBUG: %s has correct language %s\n" "$name" "$LANGUAGE" >&2
        score=$((score + 10))
+      elif grep -q "^#+language:$LANGUAGE$" $table; then
+       printf "DEBUG: %s has correct language %s\n" "$name" "$LANGUAGE" >&2
+       score=$((score + 10))
       else
        # Requested language is a must
        continue