Skip to content

feat: add comment attribute support to addString - #14

Merged
Jawnnypoo merged 2 commits into
mainfrom
feat/string-comment-attribute-temp
Jun 5, 2026
Merged

feat: add comment attribute support to addString#14
Jawnnypoo merged 2 commits into
mainfrom
feat/string-comment-attribute-temp

Conversation

@VeldtJumper

Copy link
Copy Markdown
Contributor

What

Add optional comment parameter to addString() that sets the Android comment attribute on <string> elements.

Example

ResourcesPoet.create()
    .addString("dialog_close_button", "Close", comment = "Button to dismiss the dialog")

Outputs:

<string comment="Button to dismiss the dialog" name="dialog_close_button">Close</string>

Why

The comment attribute is displayed in Android Studio's resource inspector, making it easier for translators and developers to understand the purpose of each string.

Add optional 'comment' parameter to addString() that sets the
Android 'comment' attribute on <string> elements, visible in
the Android Studio resource inspector.
@Jawnnypoo
Jawnnypoo merged commit 3301a5f into main Jun 5, 2026
2 checks passed
@Jawnnypoo
Jawnnypoo deleted the feat/string-comment-attribute-temp branch June 5, 2026 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants