Skip to content

Conversation

smelukov
Copy link
Member

@smelukov smelukov commented Jun 22, 2017

> basis lint --warn-unused-l10n src --reporter console

  ...

  /src/dealer/app/ui/field/car-body/index.l10n
    * bodyType.caption

  /src/dealer/app/ui/searchResults/list/template/list-item.l10n
    * views

  /src/dealer/app/ui/searchResults/view/module/details/template/view.l10n
    * vehicleType
    * vehicleType.caption
    * vehicleType.newcar
    * vehicleType.usedcar
    * price
    * price.noPrice
    * price.priceCurrency
    * price.priceCurrency.rub
    * price.priceCurrency.usd
    * price.priceCurrency.eur

@smelukov smelukov self-assigned this Jun 22, 2017
@smelukov smelukov force-pushed the unused-l10n-tokens branch from 39ac758 to 779caa6 Compare June 22, 2017 16:13
if (!tokenNames[tokenName]) {
flow.warn({
file: dictFileName,
message: tokenName
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be something useful, e.g. Path ${tokenName} is never used

{
var tokenNames = unusedL10nTokens[dictFileName];

dictFileName = dictFileName.slice(process.cwd().length);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

require('path').relative(process.cwd(), dictFileName)?
FileName -> Filename

});
}

tasks.push(task);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tasks.push({
  name: 'unused l10n tokens at ' + dictFileName,
  warnings: Object.keys(tokenNames).map(function(name) {
    return { file: name };
  })
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants