Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@markuplint/i18n

Package Overview
Dependencies
Maintainers
1
Versions
116
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@markuplint/i18n - npm Package Compare versions

Comparing version 3.0.0-dev.96 to 3.0.0-dev.176

test/index.spec.js

8

$schema.json

@@ -147,2 +147,3 @@ {

"top level": { "type": "string" },
"type": { "type": "string" },
"transparent model": { "type": "string" },

@@ -152,2 +153,3 @@ "unit": { "type": "string" },

"url who schema is an http(s) schema": { "type": "string" },
"use": { "type": "string" },
"username": { "type": "string" },

@@ -189,2 +191,3 @@ "value": { "type": "string" },

"{0} if it has {1}": { "type": "string" },
"{0} if you {1} {2}": { "type": "string" },
"{0} includes {1}": { "type": "string" },

@@ -195,5 +198,8 @@ "{0} is {1:c}": { "type": "string" },

"{0} is disallowed": { "type": "string" },
"{0} is disallowed to accept the following values: {1}": { "type": "string" },
"{0} is matched with the below disallowed patterns: {1}": { "type": "string" },
"{0} is not {1}": { "type": "string" },
"{0} is not allowed in {1} in this context": { "type": "string" },
"{0} is not allowed in {1} through the transparent model in this context": { "type": "string" },
"{0} is not recommended to {1}": { "type": "string" },
"{0} is unmatched with the below patterns: {1}": { "type": "string" },

@@ -224,2 +230,3 @@ "{0} less than {1}": { "type": "string" },

"a {0}": { "type": "string" },
"add {0}": { "type": "string" },
"allowed values are: {0}": { "type": "string" },

@@ -257,2 +264,3 @@ "also disallows {0} in this context": { "type": "string" },

"require {0}": { "type": "string" },
"remove {0}": { "type": "string" },
"the {0} format": { "type": "string" },

@@ -259,0 +267,0 @@ "the {0} part": { "type": "string" },

4

lib/translator.d.ts

@@ -6,2 +6,4 @@ import type { LocaleSet, Primitive, Translator } from './types';

*/
export declare function taggedTemplateTranslator(localeSet?: LocaleSet): (strings: TemplateStringsArray, ...keys: Primitive[]) => string;
export declare function taggedTemplateTranslator(
localeSet?: LocaleSet,
): (strings: Readonly<TemplateStringsArray>, ...keys: readonly Primitive[]) => string;

@@ -11,6 +11,6 @@ "use strict";

return (messageTmpl, ...keywords) => {
var _a;
var _a, _b;
let message = messageTmpl;
if (Array.isArray(messageTmpl)) {
const format = (localeSet === null || localeSet === void 0 ? void 0 : localeSet.listFormat) || defaultListFormat;
if (typeof messageTmpl !== 'string') {
const format = (_a = localeSet === null || localeSet === void 0 ? void 0 : localeSet.listFormat) !== null && _a !== void 0 ? _a : defaultListFormat;
return `${format.quoteStart}${messageTmpl

@@ -26,3 +26,3 @@ .map(keyword => translateKeyword(keyword, '', localeSet))

const key = removeNoTranslateMark(messageTmpl).toLowerCase();
const sentence = (_a = localeSet === null || localeSet === void 0 ? void 0 : localeSet.sentences) === null || _a === void 0 ? void 0 : _a[key];
const sentence = (_b = localeSet === null || localeSet === void 0 ? void 0 : localeSet.sentences) === null || _b === void 0 ? void 0 : _b[key];
messageTmpl = sentence !== null && sentence !== void 0 ? sentence : key;

@@ -29,0 +29,0 @@ messageTmpl =

@@ -1,16 +0,16 @@

export type Translator = (messageTmpl: string | string[], ...keywords: Primitive[]) => string;
export type Translator = (messageTmpl: string | readonly string[], ...keywords: readonly Primitive[]) => string;
export type LocaleSet = {
locale: string;
listFormat?: ListFormat;
keywords?: LocalesKeywords;
sentences?: LocalesKeywords;
readonly locale: string;
readonly listFormat?: ListFormat;
readonly keywords?: LocalesKeywords;
readonly sentences?: LocalesKeywords;
};
export type ListFormat = {
quoteStart: string;
quoteEnd: string;
separator: string;
readonly quoteStart: string;
readonly quoteEnd: string;
readonly separator: string;
};
export type Primitive = string | number | boolean;
export type LocalesKeywords = {
[messageId: string]: string | void;
readonly [messageId: string]: string;
};

@@ -135,2 +135,3 @@ {

"top level": "トップレベル",
"type": "型",
"transparent model": "トランスペアレントモデル",

@@ -140,2 +141,3 @@ "unit": "単位",

"url who schema is an http(s) schema": "HTTP(S)スキーマのURL",
"use": "使用",
"username": "ユーザー名",

@@ -173,2 +175,3 @@ "value": "値",

"{0} if it has {1}": "{1}を持つならば、{0}",
"{0} if you {1} {2}": "{1}する場合は、{0}",
"{0} includes {1}": "{0}は{1}を含んでいます",

@@ -179,5 +182,8 @@ "{0} is {1:c}": "{0}{1:c}",

"{0} is disallowed": "{0}は禁止されています",
"{0} is disallowed to accept the following values: {1}": "{0}は次の値を受け取ることを禁止しています: {1}",
"{0} is matched with the below disallowed patterns: {1}": "{0}は次の許可しないパターンにマッチしました {1}",
"{0} is not {1}": "{0}は{1}ではありません",
"{0} is not allowed in {1} in this context": "このコンテキストでは、{1}に{0}を含めることはできません",
"{0} is not allowed in {1} through the transparent model in this context": "このコンテキストでは、トランスペアレントモデルを介して{1}に{0}を含めることはできません",
"{0} is not recommended to {1}": "{0}は{1}することは推奨されません",
"{0} is unmatched with the below patterns: {1}": "{0}は次のパターンにマッチしませんでした {1}",

@@ -208,2 +214,3 @@ "{0} less than {1}": "{1}より小さい{0}",

"a {0}": "{0}",
"add {0}": "{0}を追加してください",
"allowed values are: {0}": "許可されている値は次のとおりです {0}",

@@ -238,2 +245,3 @@ "also disallows {0} in this context": "このコンテキスト内では{0}も許可しません",

"never {0} {1}": "{1}を{0}しないでください",
"remove {0}": "{0}を削除してください",
"require {0}": "{0}が必要です",

@@ -240,0 +248,0 @@ "the {0} format": "{0}形式",

{
"name": "@markuplint/i18n",
"version": "3.0.0-dev.96+3b9f1720",
"version": "3.0.0-dev.176+f6ad62e9",
"description": "HTML parser for markuplint",

@@ -21,3 +21,3 @@ "repository": "git@github.com:markuplint/markuplint.git",

},
"gitHead": "3b9f17205d7754b29edf790bdbbf5e4931ba27a2"
"gitHead": "f6ad62e992e1569be4067f1e90d2d6017a658f57"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc