Skip to content

Commit

Permalink
fix: l10n tags
Browse files Browse the repository at this point in the history
  • Loading branch information
zdm committed Sep 10, 2023
1 parent 04ebf27 commit 5eb28a4
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions lib/get-text.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export default class GetText {
return result( [500, message] );
}

// XXX
#parse ( poFile, content, parser, options, file, start ) {
try {
var ast = parser( content, options );
Expand Down Expand Up @@ -283,30 +284,24 @@ export default class GetText {

#parseYaml ( poFile, content, file ) {
const locale = {
l10n ( msgId, pluralMsgId, pluralNumber ) {
l10n ( msgId, { plural, pluralNumber, domain, tags } = {} ) {
poFile.addMessages( {
[msgId]: {
"pluralId": pluralMsgId,
"pluralId": plural,
"references": [file],
"domains": domain,
tags,
},
} );
},

l10nd ( domain, msgId, pluralMsgId, pluralNumber ) {
l10nt ( msgId, { plural, pluralNumber, domain, tags } = {} ) {
poFile.addMessages( {
[msgId]: {
"pluralId": pluralMsgId,
"references": [file],
"domains": [domain],
},
} );
},

l10nt ( msgId, pluralMsgId, pluralNumber ) {
poFile.addMessages( {
[msgId]: {
"pluralId": pluralMsgId,
"pluralId": plural,
"references": [file],
"domains": domain,
tags,
},
} );
},
Expand Down

0 comments on commit 5eb28a4

Please sign in to comment.