@markuplint/i18n
Advanced tools
Comparing version 1.2.0 to 2.0.0-dev.36
154
$schema.json
@@ -6,2 +6,12 @@ { | ||
"$schema": { "type": "string" }, | ||
"listFormat": { | ||
"type": "object", | ||
"additionalProperties": false, | ||
"required": ["quoteStart", "quoteEnd", "separator"], | ||
"properties": { | ||
"quoteStart": { "type": "string" }, | ||
"quoteEnd": { "type": "string" }, | ||
"separator": { "type": "string" } | ||
} | ||
}, | ||
"keywords": { | ||
@@ -13,66 +23,112 @@ "type": "object", | ||
"tag name": { "type": "string" }, | ||
"tag names": { "type": "string" }, | ||
"element": { "type": "string" }, | ||
"html elements": { "type": "string" }, | ||
"attribute": { "type": "string" }, | ||
"attributes": { "type": "string" }, | ||
"attribute name": { "type": "string" }, | ||
"attribute names": { "type": "string" }, | ||
"attribute value": { "type": "string" }, | ||
"attribute id value": { "type": "string" }, | ||
"element": { "type": "string" }, | ||
"html elements": { "type": "string" }, | ||
"class name": { "type": "string" }, | ||
"quote": { "type": "string" }, | ||
"double quotation mark": { "type": "string" }, | ||
"single quotation mark": { "type": "string" }, | ||
"role": { "type": "string" }, | ||
"the abstract role": { "type": "string" }, | ||
"the implicit role": { "type": "string" }, | ||
"aria state/property": { "type": "string" }, | ||
"global state/property": { "type": "string" }, | ||
"value": { "type": "string" }, | ||
"default value": { "type": "string" }, | ||
"content": { "type": "string" }, | ||
"contents": { "type": "string" }, | ||
"descendant": { "type": "string" }, | ||
"semantics": { "type": "string" }, | ||
"accessible name": { "type": "string" }, | ||
"lowercase": { "type": "string" }, | ||
"uppercase": { "type": "string" }, | ||
"illegal characters": { "type": "string" }, | ||
"escape in character reference": { "type": "string" }, | ||
"declarate": { "type": "string" }, | ||
"deprecated": { "type": "string" }, | ||
"obsolete": { "type": "string" }, | ||
"indentation": { "type": "string" }, | ||
"tab": { "type": "string" }, | ||
"space": { "type": "string" }, | ||
"break line": { "type": "string" }, | ||
"line break": { "type": "string" }, | ||
"equal sign": { "type": "string" }, | ||
"empty string": { "type": "string" }, | ||
"zero": { "type": "string" }, | ||
"one": { "type": "string" }, | ||
"integer": { "type": "string" }, | ||
"non-negative integer": { "type": "string" }, | ||
"floating-point number": { "type": "string" }, | ||
"angle": { "type": "string" }, | ||
"alpha channel value": { "type": "string" }, | ||
"doctype": { "type": "string" }, | ||
"obsolete doctype": { "type": "string" }, | ||
"hash-name reference": { "type": "string" }, | ||
"top level": { "type": "string" }, | ||
"declarate": { "type": "string" }, | ||
"the html specification": { "type": "string" }, | ||
"settings": { "type": "string" } | ||
"the svg specification": { "type": "string" }, | ||
"the wai-aria specification": { "type": "string" }, | ||
"aria in html specification": { "type": "string" }, | ||
"deprecated": { "type": "string" }, | ||
"c:deprecated": { "type": "string" }, | ||
"obsolete": { "type": "string" }, | ||
"c:obsolete": { "type": "string" }, | ||
"non-standard": { "type": "string" }, | ||
"c:non-standard": { "type": "string" }, | ||
"duplicated": { "type": "string" }, | ||
"c:duplicated": { "type": "string" }, | ||
"disallowed": { "type": "string" }, | ||
"c:disallowed": { "type": "string" }, | ||
"invalid": { "type": "string" }, | ||
"c:invalid": { "type": "string" }, | ||
"escape in character reference": { "type": "string" }, | ||
". ": { "type": "string" } | ||
} | ||
}, | ||
"{0} is {1}": { "type": "string" }, | ||
"The {0} {1} is {2}": { "type": "string" }, | ||
"Required {0}": { "type": "string" }, | ||
"Required {0} on {1}": { "type": "string" }, | ||
"Not required {0}": { "type": "string" }, | ||
"Not required {0} on {1}": { "type": "string" }, | ||
"Duplicate {0}": { "type": "string" }, | ||
"Missing the {0} {1}": { "type": "string" }, | ||
"Duplicate the {0} {1}": { "type": "string" }, | ||
"{0} is must {1} on {2}": { "type": "string" }, | ||
"{0} must {1}": { "type": "string" }, | ||
"{0} should {1}": { "type": "string" }, | ||
"{0} must be {1}": { "type": "string" }, | ||
"{0} should be {1}": { "type": "string" }, | ||
"{0} of {1} must be {2}": { "type": "string" }, | ||
"{0} of {1} should be {2}": { "type": "string" }, | ||
"Never {0}": { "type": "string" }, | ||
"Insert {0}": { "type": "string" }, | ||
"Never {0} {1}": { "type": "string" }, | ||
"Values allowed for {0} attributes are {$}": { "type": "string" }, | ||
"{0} width spaces": { "type": "string" }, | ||
"Always insert {0} before {1} of {2}": { "type": "string" }, | ||
"Never insert {0} before {1} of {2}": { "type": "string" }, | ||
"Always insert {0} after {1} of {2}": { "type": "string" }, | ||
"Never insert {0} after {1} of {2}": { "type": "string" }, | ||
"{0} {1} is unmatched patterns ({2})": { "type": "string" }, | ||
"Should increase indentation": { "type": "string" }, | ||
"Should decrease indentation": { "type": "string" }, | ||
"Start tag and end tag indentation should align": { "type": "string" }, | ||
"Should have a unique label because {0} landmarks were markup more than once on a page": { "type": "string" }, | ||
"The {0} element must be descendant of the {1} element": { "type": "string" }, | ||
"Invalid content of the {0} element in {1}": { "type": "string" } | ||
"sentences": { | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"the {0}": { "type": "string" }, | ||
"the \"{0}\"": { "type": "string" }, | ||
"the \"{0}\" {1}": { "type": "string" }, | ||
"the current \"{0}\" {1}": { "type": "string" }, | ||
"the implicit \"{0}\" {1}": { "type": "string" }, | ||
"{0} of {1}": { "type": "string" }, | ||
"{0:c} and {1:c}": { "type": "string" }, | ||
"either {0}": { "type": "string" }, | ||
"{0} greater than {1}": { "type": "string" }, | ||
"less than {0}": { "type": "string" }, | ||
"less than or equal to {0}": { "type": "string" }, | ||
"in the range between {0} and {1}": { "type": "string" }, | ||
"valid {0}": { "type": "string" }, | ||
"unique {0}": { "type": "string" }, | ||
"{0} as {1}": { "type": "string" }, | ||
"the same {0} as {1}": { "type": "string" }, | ||
"{0} to {1}": { "type": "string" }, | ||
"{0} or {1}": { "type": "string" }, | ||
"{0} is {1}": { "type": "string" }, | ||
"{0} is {1:c}": { "type": "string" }, | ||
"{0} is not {1}": { "type": "string" }, | ||
"It is {0}": { "type": "string" }, | ||
"It is {0:c}": { "type": "string" }, | ||
"{0} must {1}": { "type": "string" }, | ||
"{0} should {1}": { "type": "string" }, | ||
"{0} must be {1}": { "type": "string" }, | ||
"{0} should be {1}": { "type": "string" }, | ||
"{0} must not {1}": { "type": "string" }, | ||
"{0} should not {1}": { "type": "string" }, | ||
"{0} must not be {1}": { "type": "string" }, | ||
"{0} should not be {1}": { "type": "string" }, | ||
"{0} expects {1}": { "type": "string" }, | ||
"{0} expects {1:c}": { "type": "string" }, | ||
"{0} has {1}": { "type": "string" }, | ||
"{0} behaves the same as {1} if {2}": { "type": "string" }, | ||
"{0} does not exist": { "type": "string" }, | ||
"{0} contradicts {1}": { "type": "string" }, | ||
"Require {0}": { "type": "string" }, | ||
"Never {0} {1}": { "type": "string" }, | ||
"Cannot overwrite {0}": { "type": "string" }, | ||
"Cannot overwrite {0} to {1}": { "type": "string" }, | ||
"{0:c} on {1}": { "type": "string" }, | ||
"{0} according to {1}": { "type": "string" }, | ||
"{0} is unmatched with the below patterns: {1}": { "type": "string" }, | ||
"Arrowed values are: {0}": { "type": "string" }, | ||
"Did you mean \"{0}\"?": { "type": "string" } | ||
} | ||
} | ||
} | ||
} |
@@ -1,16 +0,2 @@ | ||
export declare type Primitive = string | number | boolean; | ||
export declare type Translator = (messageTmpl: string, ...keywords: Primitive[]) => string; | ||
export interface LocaleSet { | ||
keywords: LocalesKeywords; | ||
[messageId: string]: string | void | LocalesKeywords; | ||
} | ||
export interface LocalesKeywords { | ||
[messageId: string]: string | void; | ||
} | ||
export declare class I18n { | ||
private static _singleton; | ||
static create(localeSet: LocaleSet | null): I18n; | ||
localeSet: LocaleSet | null; | ||
private constructor(); | ||
translator(): Translator; | ||
} | ||
export { translator } from './translator'; | ||
export { Translator, LocaleSet } from './types'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.I18n = void 0; | ||
class I18n { | ||
constructor(localeSet) { | ||
this.localeSet = localeSet; | ||
} | ||
static create(localeSet) { | ||
if (!I18n._singleton) { | ||
I18n._singleton = new I18n(localeSet); | ||
} | ||
else { | ||
I18n._singleton.localeSet = localeSet; | ||
} | ||
return I18n._singleton; | ||
} | ||
translator() { | ||
const localeSet = this.localeSet; | ||
return (messageTmpl, ...keywords) => { | ||
let message = messageTmpl; | ||
if (localeSet) { | ||
const t = localeSet[messageTmpl]; | ||
if (typeof t === 'string') { | ||
messageTmpl = t; | ||
} | ||
} | ||
message = messageTmpl.replace(/\{([0-9]+)\}/g, ($0, $1) => { | ||
const keyword = `${keywords[+$1]}` || ''; | ||
if (localeSet) { | ||
return localeSet.keywords[keyword.toLowerCase()] || keyword; | ||
} | ||
return keyword; | ||
}); | ||
return message; | ||
}; | ||
} | ||
} | ||
exports.I18n = I18n; | ||
I18n._singleton = null; | ||
exports.translator = void 0; | ||
var translator_1 = require("./translator"); | ||
Object.defineProperty(exports, "translator", { enumerable: true, get: function () { return translator_1.translator; } }); |
{ | ||
"$schema": "../$schema.json#", | ||
"keywords": { | ||
"html elements": "HTML elements", | ||
"the html specification": "the HTML specification" | ||
"the html specification": "the HTML specification", | ||
"the svg specification": "the SVG specification", | ||
"the wai-aria specification": "the WAI-ARIA specification", | ||
"aria in html specification": "ARIA in HTML specification" | ||
} | ||
} |
{ | ||
"$schema": "../$schema.json#", | ||
"listFormat": { | ||
"quoteStart": "「", | ||
"quoteEnd": "」", | ||
"separator": "" | ||
}, | ||
"keywords": { | ||
"tag": "タグ", | ||
"tag name": "タグ名", | ||
"tag names": "タグ名", | ||
"element": "要素", | ||
"html elements": "HTML要素", | ||
"attribute": "属性", | ||
"attributes": "属性", | ||
"attribute name": "属性名", | ||
"attribute names": "属性名", | ||
"attribute value": "属性値", | ||
"attribute id value": "id属性の値", | ||
"element": "要素", | ||
"html elements": "HTML要素", | ||
"class name": "クラス名", | ||
"quote": "囲う", | ||
"double quotation mark": "ダブルクオーテーション", | ||
"single quotation mark": "シングルクォーテーション", | ||
"role": "ロール", | ||
"the abstract role": "抽象ロール", | ||
"the implicit role": "暗黙のロール", | ||
"aria state/property": "ARIAステート/プロパティ", | ||
"global state/property": "グローバルステート/プロパティ", | ||
"value": "値", | ||
"default value": "デフォルト値", | ||
"content": "内容", | ||
"contents": "内容", | ||
"descendant": "子孫", | ||
"semantics": "セマンティクス", | ||
"accessible name": "アクセシブルな名前", | ||
"lowercase": "小文字", | ||
"uppercase": "大文字", | ||
"illegal characters": "不正な文字", | ||
"escape in character reference": "参照文字でエスケープ", | ||
"declarate": "宣言", | ||
"deprecated": "非推奨", | ||
"obsolete": "廃止ずみ", | ||
"indentation": "インデント", | ||
"tab": "タブ", | ||
"space": "スペース", | ||
"break line": "改行", | ||
"line break": "改行", | ||
"equal sign": "等号", | ||
"empty string": "空文字", | ||
"zero": "ゼロ", | ||
"one": "1", | ||
"integer": "整数", | ||
"non-negative integer": "正の整数", | ||
"floating-point number": "浮動小数点数", | ||
"angle": "角度", | ||
"alpha channel value": "不透明度", | ||
"doctype": "文書型", | ||
"obsolete doctype": "廃止された文書型", | ||
"hash-name reference": "ハッシュ名参照", | ||
"top level": "トップレベル", | ||
"declarate": "宣言", | ||
"the html specification": "HTMLの仕様", | ||
"settings": "設定" | ||
"the svg specification": "SVGの仕様", | ||
"the wai-aria specification": "WAI-ARIAの仕様", | ||
"aria in html specification": "ARIA in HTMLの仕様", | ||
"deprecated": "非推奨", | ||
"c:deprecated": "は非推奨です", | ||
"obsolete": "廃止ずみ", | ||
"c:obsolete": "は廃止されています", | ||
"non-standard": "非標準", | ||
"c:non-standard": "は非標準です", | ||
"duplicated": "重複", | ||
"c:duplicated": "が重複しています", | ||
"disallowed": "未許可", | ||
"c:disallowed": "は許可されていません", | ||
"invalid": "不正", | ||
"c:invalid": "は妥当ではありません", | ||
"escape in character reference": "文字参照でエスケープ", | ||
". ": "。" | ||
}, | ||
"{0} is {1}": "{0}は{1}です", | ||
"The {0} {1} is {2}": "{0}{1}は{2}です", | ||
"Required {0}": "{0}が必要です", | ||
"Required {0} on {1}": "{1}には{0}が必要です", | ||
"Not required {0}": "{0}は不要です", | ||
"Not required {0} on {1}": "{1}には{0}は不要です", | ||
"Duplicate {0}": "{0}が重複しています", | ||
"Missing the {0} {1}": "{0}{1}が見つかりません", | ||
"Duplicate the {0} {1}": "{0}{1}が重複しています", | ||
"{0} is must {1} on {2}": "{0}は{2}で{1}べきです", | ||
"{0} must {1}": "{0}は{1}するべきです", | ||
"{0} should {1}": "{0}は{1}してください", | ||
"{0} must be {1}": "{0}は{1}にするべきです", | ||
"{0} should be {1}": "{0}は{1}にしてください", | ||
"{0} of {1} must be {2}": "{1}の{0}は{2}にするべきです", | ||
"{0} of {1} should be {2}": "{1}の{0}は{2}にしてください", | ||
"Never {0}": "{0}しないでください", | ||
"Insert {0}": "{0}を入れてください", | ||
"Never {0} {1}": "{1}を{0}しないでください", | ||
"Values allowed for {0} attributes are {$}": "{0}属性に許可される値は{$}です", | ||
"{0} width spaces": "{0}幅スペース", | ||
"Always insert {0} before {1} of {2}": "{2}の{1}の前には{0}を入れてください", | ||
"Never insert {0} before {1} of {2}": "{2}の{1}の前には{0}を入れないでください", | ||
"Always insert {0} after {1} of {2}": "{2}の{1}の後には{0}を入れてください", | ||
"Never insert {0} after {1} of {2}": "{2}の{1}の後には{0}を入れないでください", | ||
"{0} {1} is unmatched patterns ({2})": "{1}{0}は次のパターンにマッチしませんでした {2}", | ||
"Should increase indentation": "インデントを深くしてください", | ||
"Should decrease indentation": "インデントを浅くしてください", | ||
"Start tag and end tag indentation should align": "開始タグと終了タグのインデントを揃えてください", | ||
"Should have a unique label because {0} landmarks were markup more than once on a page": "{0}ランドマークが複数回マークアップされているため一意のラベルが必要です", | ||
"The {0} element must be descendant of the {1} element": "{0}要素は{1}要素の子孫でなければなりません", | ||
"Invalid content of the {0} element in {1}": "{1}において{0}要素の内容が不正です" | ||
"sentences": { | ||
"the {0}": "その{0}", | ||
"the \"{0}\"": "「{0}」", | ||
"the \"{0}\" {1}": "{1}「{0}」", | ||
"the current \"{0}\" {1}": "現在の{1}「{0}」", | ||
"the implicit \"{0}\" {1}": "暗黙の{1}「{0}」", | ||
"{0} of {1}": "{1}の{0}", | ||
"{0:c} and {1:c}": "{0}且つ、{1}", | ||
"either {0}": "{0}のいずれか", | ||
"{0} greater than {1}": "{1}より大きい{0}", | ||
"less than {0}": "{0}未満", | ||
"less than or equal to {0}": "{0}以下", | ||
"in the range between {0} and {1}": "{0}から{1}の範囲", | ||
"valid {0}": "妥当な{0}", | ||
"unique {0}": "一意の{0}", | ||
"{0} as {1}": "{1}として{0}", | ||
"the same {0} as {1}": "{1}と同等の{0}", | ||
"{0} to {1}": "{0}から{1}", | ||
"{0} or {1}": "{0}もしくは{1}", | ||
"{0} is {1}": "{0}は{1}です", | ||
"{0} is {1:c}": "{0}{1:c}", | ||
"{0} is not {1}": "{0}は{1}ではありません", | ||
"It is {0}": "{0}です", | ||
"It is {0:c}": "{0:c}", | ||
"{0} must {1}": "{0}は{1}するべきです", | ||
"{0} should {1}": "{0}は{1}したほうがよいです", | ||
"{0} must be {1}": "{0}は{1}にするべきです", | ||
"{0} should be {1}": "{0}は{1}にしたほうがよいです", | ||
"{0} must not {1}": "{0}は{1}するべきではありません", | ||
"{0} should not {1}": "{0}は{1}しないほうがよいです", | ||
"{0} must not be {1}": "{0}は{1}にするべきではありません", | ||
"{0} should not be {1}": "{0}は{1}にしないほうがよいです", | ||
"{0} expects {1}": "{0}には{1}が必要です", | ||
"{0} expects {1:c}": "{0}は{1}である必要があります", | ||
"{0} has {1}": "{0}は{1}を持っています", | ||
"{0} behaves the same as {1} if {2}": "{0}は{2}の場合、{1}と同じ振る舞いをします", | ||
"{0} does not exist": "{0}は存在しません", | ||
"{0} contradicts {1}": "{0}は{1}と矛盾しています", | ||
"Require {0}": "{0}が必要です", | ||
"Never {0} {1}": "{1}を{0}しないでください", | ||
"Cannot overwrite {0}": "{0}を上書きすることはできません", | ||
"Cannot overwrite {0} to {1}": "{0}を{1}に上書きすることはできません", | ||
"{0:c} on {1}": "{1}では、{0:c}", | ||
"{0} according to {1}": "{1}において、{0}", | ||
"{0} is unmatched with the below patterns: {1}": "{0}は次のパターンにマッチしませんでした {1}", | ||
"Arrowed values are: {0}": "許可されている値は次のとおりです {0}", | ||
"Did you mean \"{0}\"?": "「{0}」ですか?" | ||
} | ||
} |
{ | ||
"name": "@markuplint/i18n", | ||
"version": "1.2.0", | ||
"version": "2.0.0-dev.36+6a10aede", | ||
"description": "HTML parser for markuplint", | ||
@@ -18,3 +18,3 @@ "repository": "git@github.com:markuplint/markuplint.git", | ||
}, | ||
"gitHead": "94955520e9fad6a45e8831c47f6b8b342b77efdc" | ||
"gitHead": "6a10aede7385e2e97d0ba2c272a2e8c08e5429fd" | ||
} |
{ | ||
"extends": "../../../tsconfig.json", | ||
"compilerOptions": { | ||
"composite": true | ||
}, | ||
"references": [ | ||
{ | ||
"path": "../ml-ast" | ||
} | ||
], | ||
"include": ["./src/**/*"], | ||
"exclude": ["node_modules"] | ||
"extends": "../../../tsconfig.json" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52006
14
339
2
2