Skip to content

Allow strings.xml to contain plurals #875

@dewantawsif

Description

@dewantawsif

It's a standard pattern for Android to keep both strings and plurals in strings.xml file

From my understanding updating the filter here should do the work:


Due to proper guardrails being present in PluralResourceGenerator
private fun Document.findPluralNodes(): Sequence<Element> = sequence {
SOURCE_PLURAL_NODE_NAMES.forEach { elementName ->
val pluralNodes: NodeList = getElementsByTagName(elementName)
for (i: Int in 0 until pluralNodes.length) {
yield(pluralNodes.item(i) as Element)
}
}
}
private companion object {
val SOURCE_PLURAL_NODE_NAMES: List<String> = listOf("plural", "plurals")
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions