@@ -25,15 +25,15 @@ def interpolate_message(
2525
2626 Mirrors JS ``interpolateMessage()`` behavior:
2727
28- 1. Extract user variables (filter out ``$``-prefixed keys).
28+ 1. Extract user variables (filter out GT-reserved keys).
2929 2. Extract ``_gt_`` declared variables from the source/fallback.
3030 3. Condense ``_gt_`` selects to simple refs (only if declared vars exist).
3131 4. Format with ICU MessageFormat.
32- 5. Apply ``$max_chars `` cutoff if specified.
32+ 5. Apply ``_max_chars `` cutoff if specified.
3333
3434 On error:
35- - If ``$_fallback `` (source) is available, recursively retry with
36- the source message (clearing ``$_fallback `` to prevent infinite loop).
35+ - If ``__fallback `` (source) is available, recursively retry with
36+ the source message (clearing ``__fallback `` to prevent infinite loop).
3737 - Otherwise, return the raw message with cutoff applied.
3838
3939 Args:
@@ -44,8 +44,8 @@ def interpolate_message(
4444 Returns:
4545 The interpolated string.
4646 """
47- source = options .get ("$_fallback " )
48- max_chars = options .get ("$max_chars " )
47+ source = options .get ("__fallback " )
48+ max_chars = options .get ("_max_chars " )
4949
5050 # Remove GT-related options, keep user variables
5151 variables = extract_variables (options )
@@ -83,7 +83,7 @@ def interpolate_message(
8383 if source is not None and isinstance (source , str ):
8484 return interpolate_message (
8585 source ,
86- {** options , "$_fallback " : None },
86+ {** options , "__fallback " : None },
8787 locale ,
8888 )
8989
0 commit comments