File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1+ from typing import Optional
2+
13from babel import support
24from flask import current_app
35from flask import request
79__all__ = ("Translations" , "translations" )
810
911
10- def _get_translations ():
12+ def _get_translations () -> Optional [ support . Translations ] :
1113 """Returns the correct gettext translations.
1214 Copy from flask-babel with some modifications.
1315 """
@@ -31,11 +33,11 @@ def _get_translations():
3133
3234
3335class Translations :
34- def gettext (self , string ) :
36+ def gettext (self , string : str ) -> str :
3537 t = _get_translations ()
3638 return string if t is None else t .ugettext (string )
3739
38- def ngettext (self , singular , plural , n ) :
40+ def ngettext (self , singular : str , plural : str , n : int ) -> str :
3941 t = _get_translations ()
4042
4143 if t is None :
You can’t perform that action at this time.
0 commit comments