You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By integrating string formattig with the localize() function call we can
make both the translations easier to comprehend, as well as the code
more transparant/readable.
And by using SafeDict() it is also more reliable if arguments do not add up.
When a key is not found the 'template' remains in the string.
Copy file name to clipboardExpand all lines: resources/language/resource.language.en_gb/strings.po
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -634,11 +634,11 @@ msgid "Please increase the maximum bandwidth. Maximum bandwidth is set to {max}
634
634
msgstr""
635
635
636
636
msgctxt"#30958"
637
-
msgid"There is a problem with this VRT NU %s stream. Try again with %s %s %s or try to play this program from the VRT NU website. Please report this problem at https://www.vrt.be/vrtnu/help/"
637
+
msgid"There is a problem with this VRT NU {protocol} stream. Try again with {component} {state} or try to play this program from the VRT NU website. Please report this problem at https://www.vrt.be/vrtnu/help/"
638
638
msgstr""
639
639
640
640
msgctxt"#30959"
641
-
msgid"and Widevine DRM"
641
+
msgid"InputStream Adaptive and Widevine DRM"
642
642
msgstr""
643
643
644
644
msgctxt"#30960"
@@ -650,7 +650,7 @@ msgid "enabled"
650
650
msgstr""
651
651
652
652
msgctxt"#30962"
653
-
msgid"There is a problem with this VRT NU %s stream and Kodi %s does not support the alternative stream. Please upgrade to a newer Kodi version or try to play this program from the VRT NU website. Please report this problem at https://www.vrt.be/vrtnu/help/"
653
+
msgid"There is a problem with this VRT NU {protocol} stream and Kodi {version} does not support the alternative stream. Please upgrade to a newer Kodi version or try to play this program from the VRT NU website. Please report this problem at https://www.vrt.be/vrtnu/help/"
654
654
msgstr""
655
655
656
656
msgctxt"#30965"
@@ -678,7 +678,7 @@ msgid "Failed to get favorites token from VRT NU"
678
678
msgstr""
679
679
680
680
msgctxt"#30976"
681
-
msgid"Failed to (un)follow program '%s' at VRT NU"
681
+
msgid"Failed to (un)follow program '{program}' at VRT NU"
Copy file name to clipboardExpand all lines: resources/language/resource.language.nl_nl/strings.po
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -526,12 +526,12 @@ msgid "Please increase the maximum bandwidth. Maximum bandwidth is set to {max}
526
526
msgstr"Verhoog de maximale bandbreedte alstublieft. De maximale bandbreedte is ingesteld op {max} kbps, maar deze stream heeft minimum {min} kbps nodig."
527
527
528
528
msgctxt"#30958"
529
-
msgid"There is a problem with this VRT NU %s stream. Try again with %s %s %s or try to play this program from the VRT NU website. Please report this problem at https://www.vrt.be/vrtnu/help/"
530
-
msgstr"Er is een probleem met deze VRT NU %s-stream. Probeer het opnieuw met %s %s %s of probeer dit programma af te spelen vanaf de VRT NU-website. Meld dit probleem op https://www.vrt.be/vrtnu/help/"
529
+
msgid"There is a problem with this VRT NU {protocol} stream. Try again with {component} {state} or try to play this program from the VRT NU website. Please report this problem at https://www.vrt.be/vrtnu/help/"
530
+
msgstr"Er is een probleem met deze VRT NU {protocol}-stream. Probeer het opnieuw met {component} {state} of probeer dit programma af te spelen vanaf de VRT NU-website. Meld dit probleem op https://www.vrt.be/vrtnu/help/"
531
531
532
532
msgctxt"#30959"
533
-
msgid"and Widevine DRM"
534
-
msgstr"en Widevine DRM"
533
+
msgid"InputStream Adaptive and Widevine DRM"
534
+
msgstr"InputStream Adaptive en Widevine DRM"
535
535
536
536
msgctxt"#30960"
537
537
msgid"disabled"
@@ -542,8 +542,8 @@ msgid "enabled"
542
542
msgstr"ingeschakeld"
543
543
544
544
msgctxt"#30962"
545
-
msgid"There is a problem with this VRT NU %s stream and Kodi %s does not support the alternative stream. Please upgrade to a newer Kodi version or try to play this program from the VRT NU website. Please report this problem at https://www.vrt.be/vrtnu/help/"
546
-
msgstr"Er is een probleem met deze VRT NU %s-stream en Kodi %s ondersteunt de alternatieve stream niet. Schakel over op een nieuwere versie van Kodi of probeer dit programma af te spelen vanaf de VRT NU-website. Meld dit probleem op https://www.vrt.be/vrtnu/help/"
545
+
msgid"There is a problem with this VRT NU {protocol} stream and Kodi {version} does not support the alternative stream. Please upgrade to a newer Kodi version or try to play this program from the VRT NU website. Please report this problem at https://www.vrt.be/vrtnu/help/"
546
+
msgstr"Er is een probleem met deze VRT NU {protocol}-stream en Kodi {version} ondersteunt de alternatieve stream niet. Schakel over op een nieuwere versie van Kodi of probeer dit programma af te spelen vanaf de VRT NU-website. Meld dit probleem op https://www.vrt.be/vrtnu/help/"
547
547
548
548
msgctxt"#30965"
549
549
msgid"Using a SOCKS proxy requires the PySocks library (script.module.pysocks) installed."
@@ -570,8 +570,8 @@ msgid "Failed to get favorites token from VRT NU"
570
570
msgstr"Ophalen van het favorieten token van VRT NU is mislukt"
571
571
572
572
msgctxt"#30976"
573
-
msgid"Failed to (un)follow program '%s' at VRT NU"
574
-
msgstr"Het programma '%s' op VRT NU volgen of vergeten is mislukt"
573
+
msgid"Failed to (un)follow program '{program}' at VRT NU"
574
+
msgstr"Het programma '{program}' op VRT NU volgen of vergeten is mislukt"
msgstr"Geen on demand stream beschikbaar voor {title}"
611
611
612
612
msgctxt"#30990"
613
613
msgid"This program cannot be played. To view this program outside of Belgium, you first have to validate a Belgian mobile phone number on the VRT NU website."
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
4
+
5
+
# pylint: disable=missing-docstring
6
+
7
+
from __future__ importabsolute_import, division, print_function, unicode_literals
8
+
importunittest
9
+
10
+
fromresources.libimportkodiwrapper
11
+
12
+
xbmc=__import__('xbmc')
13
+
xbmcaddon=__import__('xbmcaddon')
14
+
xbmcgui=__import__('xbmcgui')
15
+
xbmcplugin=__import__('xbmcplugin')
16
+
xbmcvfs=__import__('xbmcvfs')
17
+
18
+
19
+
classKodiTests(unittest.TestCase):
20
+
21
+
_kodi=kodiwrapper.KodiWrapper(None)
22
+
23
+
deftest_localize(self):
24
+
msg=self._kodi.localize(30958)
25
+
self.assertEqual(msg, "There is a problem with this VRT NU {protocol} stream. Try again with {component} {state} or try to play this program from the VRT NU website. Please report this problem at https://www.vrt.be/vrtnu/help/") # noqa
self.assertEqual(msg, "There is a problem with this VRT NU {protocol} stream. Try again with Widevine DRM enabled or try to play this program from the VRT NU website. Please report this problem at https://www.vrt.be/vrtnu/help/") # noqa
self.assertEqual(msg, "There is a problem with this VRT NU MPEG-DASH stream. Try again with Widevine DRM enabled or try to play this program from the VRT NU website. Please report this problem at https://www.vrt.be/vrtnu/help/") # noqa
0 commit comments