X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=parsers%2F60_translation_links.sh;h=3e3025b3128f7bc90f74eed8eb48a5f77ca1dea3;hb=2506cfcd83b7247d669818e3cdf8d34b0b04404a;hp=00207194c9668bb03c5de9c6b93ec4b4002d240d;hpb=225fc80e7ea2ba2da28ff7c67859b588338f5494;p=shellwiki diff --git a/parsers/60_translation_links.sh b/parsers/60_translation_links.sh index 0020719..3e3025b 100755 --- a/parsers/60_translation_links.sh +++ b/parsers/60_translation_links.sh @@ -1,5 +1,19 @@ #!/bin/sh +# Copyright 2023 Paul Hänsch +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +# SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +# IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + if [ "$LANGUAGE" != "$LANGUAGE_DEFAULT" ]; then sed -E 's;(<[^>]+ )href="((/[^"/]+|[^"/]+[^:/]|)/([^"/]+/)*)"([^>]*>);\1href="\2:'"${LANGUAGE}"'"\5;g' else