yiisoft / yiisoft/translator

Dispatch events on `IntlException` or error in `IntlMessageFormatter`

Open
#88 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
26
Forks
10
Avg merge
48m
Merged PRs (30d)
1

Description

If this code:
$formatter = new MessageFormatter($locale, $message);
throw IntlException, then we should dispatch event and return raw message.

If $formatter->format($parameters); return false, then dispatch event and return raw message.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the IntlMessageFormatter handling and reproduce both cases described: an IntlException during MessageFormatter construction and a false result from format(). Done means each failure dispatches the relevant event and returns the raw message.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
internationalization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.