Skip to content

Commit 3420015

Browse files
committed
fix: locale domains
1 parent f5a4194 commit 3420015

File tree

1 file changed

+2
-20
lines changed

1 file changed

+2
-20
lines changed

lib/get-text.js

+2-20
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ export default class GetText {
152152
"references": null,
153153
"flags": null,
154154
"extractedComments": null,
155-
"domains": null,
156155
};
157156

158157
// message id
@@ -169,8 +168,6 @@ export default class GetText {
169168
message.pluralId = options.plural;
170169
if ( options.isTemplate ) message.flags = ["javascript-format"];
171170
}
172-
173-
message.domains = options.domain;
174171
}
175172

176173
// extracted comments
@@ -232,7 +229,6 @@ export default class GetText {
232229
const res = {
233230
"plural": null,
234231
"isTemplate": null,
235-
"domain": null,
236232
};
237233

238234
if ( node.type !== "ObjectExpression" ) return res;
@@ -259,18 +255,6 @@ export default class GetText {
259255
res.isTemplate = plural.isTemplate;
260256
}
261257
}
262-
263-
// domain
264-
else if ( key === "domain" ) {
265-
if ( property.value.type === "Literal" ) {
266-
res.domain = property.value.value;
267-
}
268-
else if ( property.value.type === "TemplateLiteral" ) {
269-
if ( property.value.quasis.length === 1 ) {
270-
res.domain = property.value.quasis.map( node => node.value.cooked ).join( "${n}" );
271-
}
272-
}
273-
}
274258
}
275259

276260
return res;
@@ -317,22 +301,20 @@ export default class GetText {
317301

318302
#parseYaml ( poFile, content, file ) {
319303
const locale = {
320-
l10n ( msgId, { plural, pluralNumber, domain } = {} ) {
304+
l10n ( msgId, { plural, pluralNumber } = {} ) {
321305
poFile.addMessages( {
322306
[msgId]: {
323307
"pluralId": plural,
324308
"references": [file],
325-
"domains": domain,
326309
},
327310
} );
328311
},
329312

330-
l10nt ( msgId, { plural, pluralNumber, domain } = {} ) {
313+
l10nt ( msgId, { plural, pluralNumber } = {} ) {
331314
poFile.addMessages( {
332315
[msgId]: {
333316
"pluralId": plural,
334317
"references": [file],
335-
"domains": domain,
336318
},
337319
} );
338320
},

0 commit comments

Comments
 (0)