Start localization without auto detecting

This commit is contained in:
Adolfo Reyna
2022-12-19 21:48:31 -05:00
parent 923bbabd3a
commit 2e55d41adf
8 changed files with 249 additions and 67 deletions

View File

@@ -3,6 +3,7 @@ import { Button } from 'react-native-paper';
import API from './../../API.js';
import { useSnapshot } from 'valtio';
import GlobalState from '../../contexts/GlobalState.js';
import i18n from "../../i18nMessages.js";
const followProfile = async (profileid, me, setFollowing, setPending) => {
// Simulates the changes on the DB to speed up the UI
@@ -55,8 +56,8 @@ let FollowButton = ({ profile }) => {
const type = profile._id ? (!profile.isGroup ? "User" : (profile.isCourse ? "Course" : "Group")) : "User";
const action = type === 'User' ? (following ? "Unfollow" : "Follow") :
(following ? "Unsubscribe" : (pending ? "Pending" : "Subscribe"));
const action = type === 'User' ? (following ? i18n.t("message.unfollow") : i18n.t("message.follow")) :
(following ? i18n.t("message.unsubscribe") : (pending ? i18n.t("message.pending") : i18n.t("message.subscribe")));
const toggleFollowThisProfile = () => {