From 599f37d2fe6f6ad641346017513f14bb40053e4a Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Sat, 7 Oct 2023 10:09:53 -0300 Subject: [PATCH] Update `t` --- nanoc/lib/mixin/t.rb | 6 +++--- packages/typescript/Quran/quran-json | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) create mode 160000 packages/typescript/Quran/quran-json diff --git a/nanoc/lib/mixin/t.rb b/nanoc/lib/mixin/t.rb index 942f1ef..322bc12 100644 --- a/nanoc/lib/mixin/t.rb +++ b/nanoc/lib/mixin/t.rb @@ -1,7 +1,7 @@ module Mixin::T - def t(locale, key, locals = {}) - str = [locale, *key.split(".")].inject(i18n) { |h, k| h[k] } - format(str, locals) + def t(locale, key, local_assigns = {}) + str = [locale, *key.split(".")].inject(i18n) { _1[_2] } + format(str, local_assigns) end def i18n diff --git a/packages/typescript/Quran/quran-json b/packages/typescript/Quran/quran-json new file mode 160000 index 0000000..d75b511 --- /dev/null +++ b/packages/typescript/Quran/quran-json @@ -0,0 +1 @@ +Subproject commit d75b511adc63465b3b0bce67395c25512c48a137