Skip to content

(doc): fix an incorrect snippet #324

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

Closed
wants to merge 1 commit into from
Closed

(doc): fix an incorrect snippet #324

wants to merge 1 commit into from

Conversation

thammarith
Copy link

For auth_set_language_code.js, the snippet for version 9 is incorrect. Presumably, it took the version 8's and hasn't been updated to correctly reflect version 9.

To use the device's language, useDeviceLanguage() has to be called directly from auth not firebase.auth() like version 8.

import { getAuth } from "firebase/auth";

const auth = getAuth();
auth.languageCode = 'it';
// To apply the default browser preference instead of explicitly setting it.
- // firebase.auth().useDeviceLanguage();
+ // auth.useDeviceLanguage();

@google-cla
Copy link

google-cla bot commented Feb 12, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@thatfiredev
Copy link
Member

@thammarith Thanks for finding this and putting up a PR! :)

As noted at the top, this file is auto-generated from auth-next/index.js. Can you please edit that file instead? And after editing, please run npm run snippets to regenerate the appropriate files.

// This snippet file was generated by processing the source file:
// ./auth-next/index.js
//
// To update the snippets in this file, edit the source and then run
// 'npm run snippets'.

@thatfiredev
Copy link
Member

Hey @thammarith
Just checking in on this

thatfiredev pushed a commit that referenced this pull request Jul 7, 2023
* chore: add missing whitespace

* chore: fix an incorrect snippet (#324)
@thatfiredev
Copy link
Member

This has been fixed in #352

@thatfiredev thatfiredev closed this Jul 7, 2023
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