Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] formula assistant: localize argument separator #3790

Conversation

hokolomopo
Copy link
Contributor

Description

The argument separator in the formula assistant was not localized, it was always a comma no matter the locale. This commit fixes it.

Task: : 3789860

review checklist

  • feature is organized in plugin, or UI components
  • support of duplicate sheet (deep copy)
  • in model/core: ranges are Range object, and can be adapted (adaptRanges)
  • in model/UI: ranges are strings (to show the user)
  • undo-able commands (uses this.history.update)
  • multiuser-able commands (has inverse commands and transformations where needed)
  • new/updated/removed commands are documented
  • exportable in excel
  • translations (_t("qmsdf %s", abc))
  • unit tested
  • clean commented code
  • track breaking changes
  • doc is rebuild (npm run doc)
  • status is correct in Odoo

The argument separator in the formula assistant was not localized, it
was always a comma no matter the locale. This commit fixes it.

Task: 3789860
@robodoo
Copy link
Collaborator

robodoo commented Mar 6, 2024

@@ -73,6 +73,10 @@ export class FunctionDescriptionProvider extends Component<Props> {
this.assistantState.allowCellSelectionBehind = false;
}, 2000) as unknown as number;
}

get formulaArgSeparator() {
return this.env.model.getters.getLocale().formulaArgSeparator + " ";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
return this.env.model.getters.getLocale().formulaArgSeparator + " ";
return this.env.model.getters.getLocale().formulaArgSeparator + "\u00A0";

Not sure if the unbreakable space was necessary though

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't put an unbreaking space because it looks like simple spaces are preserved with t-esc. And it makes it harder to read the code if you don't know by heart unicode characters ;)

Copy link
Collaborator

@LucasLefevre LucasLefevre left a comment

Choose a reason for hiding this comment

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

robodoo r+

robodoo pushed a commit that referenced this pull request Mar 21, 2024
The argument separator in the formula assistant was not localized, it
was always a comma no matter the locale. This commit fixes it.

closes #3790

Task: 3789860
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
@robodoo robodoo closed this Mar 21, 2024
@fw-bot
Copy link
Collaborator

fw-bot commented Mar 22, 2024

Forward-porting to 'saas-17.2' (from #3882).

@fw-bot fw-bot deleted the saas-16.4-formula-assisstant-separator-locale-adrm branch April 4, 2024 14:47
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.

None yet

5 participants