Skip to content

Rephrase usage of Palette in user-facing strings#77

Merged
maxmmitchell merged 1 commit into
mainfrom
reword-palette
May 15, 2026
Merged

Rephrase usage of Palette in user-facing strings#77
maxmmitchell merged 1 commit into
mainfrom
reword-palette

Conversation

@maxmmitchell
Copy link
Copy Markdown
Contributor

"Palette" is a bit confusing in English when what we mean is "a collection of brushes". In English, "palette" generally refers to either a collection of colors or a board which a painter would use to hold a collection of different colored paints. This change replaces "Save to Palette" with "Save" on the button (and "Save to Cahier" in the dialog box) and "My Palette" with "My Brushes".

There's still some functions referring to the palette, but since that's not user-facing I think it's ok for now, and lower priority to do a larger renaming refactor of the code.

@maxmmitchell maxmmitchell marked this pull request as ready for review May 14, 2026 21:09
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the UI terminology by replacing references to "Palette" with "Brushes" or "Cahier" across the Brush Designer and Brush Graph modules, while also applying some code reformatting for better readability. The review feedback identifies significant redundancy in the newly added string resources. Specifically, the reviewer suggests consolidating module-specific strings for "Save" and "My Brushes" into existing generic or shared resources to reduce localization overhead and improve maintainability.

<string name="brush_designer_my_brushes">My Brushes</string>
<string name="brush_designer_no_saved_brushes">No saved brushes yet</string>
<string name="brush_designer_save_to_palette">Save to Cahier Palette</string>
<string name="brush_designer_save">Save</string>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The string resource brush_designer_save is redundant because it has the same value ('Save') as the generic save string defined on line 43. Since R.string.save is already used in other parts of the application (including within this same module's dialogs), it is better to use the existing generic resource to maintain consistency and reduce localization overhead.

Comment on lines +281 to +282
<string name="bg_save">Save</string>
<string name="bg_save_to_cahier">Save to Cahier</string>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There is redundancy between the bg_ prefixed strings and the brush_designer_ prefixed strings. Specifically:

  • bg_save (line 281) is identical to brush_designer_save (line 110) and the generic save (line 43).
  • bg_save_to_cahier (line 282) is identical to brush_designer_save_dialog_title (line 114).
  • bg_my_brushes (line 311) is identical to brush_designer_my_brushes (line 108).

While module-specific prefixes can be useful, for strings that are identical and used across multiple developer tools, it is more maintainable to define a single shared resource (e.g., my_brushes or save_to_cahier) in a common section.

} else {
TextButton(onClick = onShowSaveDialog) {
Text(stringResource(R.string.brush_designer_save_to_palette))
Text(stringResource(R.string.brush_designer_save))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Consider using the generic R.string.save instead of the module-specific R.string.brush_designer_save to avoid redundancy, as they both resolve to the same value and the generic one is already used elsewhere in this file (e.g., line 418).

Suggested change
Text(stringResource(R.string.brush_designer_save))
Text(stringResource(R.string.save))

modifier = Modifier.height(40.dp),
) {
Text(stringResource(R.string.bg_save_to_palette))
Text(stringResource(R.string.bg_save))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Consider using the generic R.string.save instead of R.string.bg_save to reduce string resource redundancy.

Suggested change
Text(stringResource(R.string.bg_save))
Text(stringResource(R.string.save))

Copy link
Copy Markdown
Contributor

@cka-dev cka-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@maxmmitchell maxmmitchell merged commit f0dbe16 into main May 15, 2026
3 checks passed
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