Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analyze does not respect linked translation in enum #231

Closed
ChaserVasya opened this issue Jun 30, 2024 · 1 comment
Closed

Analyze does not respect linked translation in enum #231

ChaserVasya opened this issue Jun 30, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@ChaserVasya
Copy link

ChaserVasya commented Jun 30, 2024

To Reproduce
tr_ru.i18n.json:

{
  "scheduleFailedBlockDefault": "Редактирование невозможно",
  "scheduleFieldBlockMap(context=ScheduleTemplateFieldType, param=type)": {
    "assistant": "Выберите услугу",
    "status": "Статус нельзя изменить",
    "employee": "Выберите тренера",
    "service": "Выберите локацию",
    "duration": "Выберите услугу",
    "room": "Выберите услугу",
    "capacity": "Выберите услугу",
    "date": "Выберите услугу",
    "time": "Выберите услугу",
    "visitor": "Выберите дату",
    "cancelReason,location,comment,guest,totalArrived": "@:scheduleFailedBlockDefault"
  }
}

dart run slang analyze -full
_unused_translations.json:

{
  "@@info": [
    "Here are translations that exist in secondary locales but not in <ru>.",
    "[--full enabled] Furthermore, translations not used in 'lib/' according to the 'tr.<path>' pattern are written into <ru>."
  ],
  "ru": {
    "scheduleFailedBlockDefault": "Редактирование невозможно"
  }
  ....
}

Expected behavior

{
  "@@info": [
    "Here are translations that exist in secondary locales but not in <ru>.",
    "[--full enabled] Furthermore, translations not used in 'lib/' according to the 'tr.<path>' pattern are written into <ru>."
  ],
  "ru": { }
  ....
}

Additional context
3.31.1

@ChaserVasya ChaserVasya added the bug Something isn't working label Jun 30, 2024
@Tienisto Tienisto changed the title Full analyzing doesn't analyze enums Analyze does not respect linked translation in enum Jun 30, 2024
@Tienisto
Copy link
Member

Fixed in 4.0.0-dev.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants