-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
81 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import os | ||
import locale | ||
|
||
from fluent.runtime import FluentLocalization, FluentResourceLoader | ||
|
||
cache = {} | ||
|
||
def get_l10n(name): | ||
if name not in cache: | ||
d = os.path.dirname(__file__) | ||
loc = locale.getlocale()[0] | ||
loader = FluentResourceLoader(f'{d}/l10n/{{locale}}') | ||
l10n = FluentLocalization([loc, "en"], [f'{name}.ftl'], loader) | ||
cache[name] = l10n | ||
return cache[name] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
nonexistent-deps-subject = Non-existent dependencies is listed in lilac.yaml for { $pkg } | ||
nonexistent-deps-body = lilac.yaml of package { $pkg } specifies repo_depends, but the (direct or indirect) {$count -> | ||
[one] dependency { $deps } is | ||
*[other] dependencies { $deps } are | ||
} not in this repository. | ||
update_on_build-error = Error while checking update_on_build for %s | ||
dependency-issue-subject = Dependency issue for %s | ||
dependency-issue-failed = {$count -> | ||
[one] Dependency | ||
*[other] Dependencies | ||
} { $faileddeps } for { $pkg } failed to build. | ||
dependency-issue-failed-this-batch = {$count_deps -> | ||
[one] Dependency { $deps } for { $pkg } is | ||
*[other] Dependencies { $deps } for { $pkg } are | ||
} missing, among which {$count_failed -> | ||
[one] { $faileddeps } has | ||
*[other] { $faileddeps } have | ||
} failed this time. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
runtime-error = Runtime error | ||
runtime-error-traceback = Traceback follows: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
nonexistent-deps-subject = 软件包 { $pkg } 的 lilac.yaml 指定了不存在的依赖 | ||
nonexistent-deps-body = 软件包 { $pkg } 的 lilac.yaml 指定了 repo_depends,然而其直接或者间接的依赖项 { $deps } 并不在本仓库中。 | ||
update_on_build-error = %s update_on_build 检查出错 | ||
dependency-issue-subject = %s 出现依赖问题 | ||
dependency-issue-failed = { $pkg } 的依赖 { $faileddeps } 打包失败了。 | ||
dependency-issue-failed-this-batch = { $pkg } 缺少依赖 { $deps },其中 { $faileddeps } 本次打包失败了。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
runtime-error = 运行时错误 | ||
runtime-error-traceback = 调用栈如下: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters