Compile plural strings to android <plurals> elem

In a .grd file, we can write a plural string like this:

<message name="IDS_THINGS">
  {NUM_THINGS, plural,
  =1 {1 thing}
  other {# things}}

The android equivalent looks like this:

<plurals name="things">
  <item quantity="one">1 thing</item>
  <item quantity="other">%d things</item>

However, currently the raw value is being stored as a <string> element.

This change introduces some basic (certainly not fool-proof) parsing of
the plural message in a .grd file and outputs it in the proper android


Review URL: .

Patch from Conley Owens <>.

git-svn-id: 7262f16d-afe8-6277-6482-052fa10e57b1
2 files changed