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

[Bug]: documentation error for function usei18n #127

Closed
1 task done
kletts opened this issue Aug 5, 2023 · 0 comments · Fixed by #128
Closed
1 task done

[Bug]: documentation error for function usei18n #127

kletts opened this issue Aug 5, 2023 · 0 comments · Fixed by #128
Labels

Comments

@kletts
Copy link

kletts commented Aug 5, 2023

Guidelines

  • I agree to follow this project's Contributing Guidelines.

Project Version

v0.3.0

Platform and OS Version

All

Existing Issues

No response

What happened?

The documentation example for the function usei18n includes the following observe event and update language, see file: https://github.com/Appsilon/shiny.i18n/blob/132348b87429b107efd03ac544952f04b488f949/R/ui.R#L44C10-L45C1

#' observeEvent(input$go,{
#' update_lang(session, "pl")
#' })

However as per the requirements update_lang, the session argument comes second. Although minor the error message from the example is unintuitive and difficult to trace for new users of the package:

Warning: Error in : $ operator is invalid for atomic vectors

Steps to reproduce

...

Expected behavior

Corrected example:

#' observeEvent(input$go,{
#' update_lang(language="pl", session=session)
#' })

Attachments

No response

Screenshots or Videos

No response

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant