Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Aug 16, 2024
  2. Aug 15, 2024
  3. Aug 14, 2024
  4. Aug 13, 2024
  5. Aug 12, 2024
  6. Aug 10, 2024
  7. Aug 09, 2024
  8. Aug 08, 2024
  9. Aug 07, 2024
  10. Aug 06, 2024
    • metamben's avatar
      d312a304
    • Alexander Polyankin's avatar
      Support both name & field ref-based column keys in viz settings on read and... · d3a51585
      Alexander Polyankin authored
      Support both name & field ref-based column keys in viz settings on read and upgrade on write (#46383)
      
      d3a51585
    • dpsutton's avatar
      Fix bad i18n string (#46454) · ce61da58
      dpsutton authored
      Fixes #46440
      
      couple things come together here.
      
      Bad escaping:
      The `{` characters are used for format strings and placeholders like
      
      ```clojure
      impl=> (translate "fr" "After {0}" ["Bob"])
      "Après Bob"
      ```
      
      And if you want _literal_ {'s in your translation string, you must
      escape them like "'{" or "'}" using an apostrophe. But this isn't the
      end of our worries.
      
      in `resources/zh-CN.edn`, we actually have _two_ translations for the
      original string:
      
      ```clojure
      "User lookup filter. The placeholder '{login'} will be replaced by the user supplied login."
      "用户找过滤器,占位符 '{login'} 将替换为用户提供的登录名。"
      
      ,,,
      
      "User lookup filter. The placeholder '{login}' will be replaced by the user supplied login."
      "用户查找筛选器。占位符“{login}”将替换为用户提供的登录名。"
      ```
      
      And this later has unescaped curlies.
      
      The fix for that is at
      https://poeditor.com/projects/po_edit?per_page=20&id=200535&id_language=31&filter=&order=&search=User+lookup+filter
      but will need to wait for the new source translation string in this
      instance with the corrected escaping.
      
      ```clojure
      ;; simulate what happens at runtime
      impl=> (translated-format-string "zh_CN"
                                       "User lookup filter. The placeholder '{login}' will be replaced by the user supplied login."
                                       {})
      "用户查找筛选器。占位符“{login}”将替换为用户提供的登录名。"
      impl=> (MessageFormat. *1 (locale "zh_CN"))
      Execution error (NumberFormatException) at java.lang.NumberFormatException/forInputString (NumberFormatException.java:67).
      For input string: "login"
      ;; the problematic zh-CN string
      impl=> (MessageFormat. "用户查找筛选器。占位符“{login}”将替换为用户提供的登录名。")
      Execution error (NumberFormatException) at java.lang.NumberFormatException/forInputString (NumberFormatException.java:67).
      For input string: "login"
      ;; minimal reproduction
      impl=> (MessageFormat. "“{login}”")
      Execution error (NumberFormatException) at java.lang.NumberFormatException/forInputString (NumberFormatException.java:67).
      For input string: "login"
      ```
      ce61da58
Loading