Voting starts in March for the Drupal Association Board election.
The views number field handler supports the following use cases:
- Precision (round the values) (optionally)
- Configure a decimal / thousand separator
- Allow to configure single/plural exists for format_plural This is missing from number field formatters in Entity Fields
- Allow to prefix/suffix the output
On, we switched numeric base fields in Views so that they are rendered by the Entity rendering system (i.e., using Field Formatters to format the output) instead of using the base Views numeric field handler. So, we've lost a bit of functionality and we want to make sure that the formatters for numeric fields in the Entity rendering system gets the functionality that the Views base field handler has.
Add the ability to configure a Field UI numeric field formatter to output using format_plural, like you can currently on the \Drupal\views\Plugin\views\field\Numeric class.
We also need a test for foreign languages and format_plural, with both Views and Entity Displays. It should:
- Create a view and an entity display in a language with N plural forms, where N != 2.
- Verify that the formatter works correctly for several field values (picks the correct plural form)
- Verify the settings form works correctly
Make a patch, including test.
User interface changes
The Field UI formatter for numbers will have additional options allowing you to specify the output for singular and plural values, similar to how the Views numeric field handler does this.
Additional settings on the Field UI formatter for numeric fields.
Beta phase evaluation
|Issue category||Task because it is not really a bug per se, and it's not really a feature since the functionality existed before for numeric base fields and we lost it in.|
|Issue priority||Major because of the regression and the config changes involved.|
|Disruption||Some disruption for configuration of field formatters for numbers, but defaults are provided so it should not actually break anything.|
PASSED: [[SimpleTest]]: [PHP 5.5 MySQL] 112,578 pass(es). View
FAILED: [[SimpleTest]]: [PHP 5.5 MySQL] 112,578 pass(es), 2 fail(s), and 0 exception(s). View