<commit_before>import { Meteor } from 'meteor/meteor';
import { Tracker } from 'meteor/tracker';
import { TAPi18n } from 'meteor/tap:i18n';
import { FlowRouter } from 'meteor/kadira:flow-router';
import moment from 'moment';

Meteor.startup(() => {
  Tracker.autorun((tracker) => {
    if (Meteor.user() != null) {
      tracker.stop();

      const language = FlowRouter.current().params.language;
      const myLanguage = Meteor.user().profile.language;

      if (language != myLanguage) {
        FlowRouter.withReplaceState(() => {
          FlowRouter.setParams({ language: myLanguage });
        });
      }

      if (TAPi18n.getLanguage() != myLanguage) {
        TAPi18n.setLanguage(myLanguage);<commit_msg>fix moment locale initialization<commit_after>import { Meteor } from 'meteor/meteor';
import { Tracker } from 'meteor/tracker';
import { TAPi18n } from 'meteor/tap:i18n';
import { FlowRouter } from 'meteor/kadira:flow-router';
import moment from 'moment';

Meteor.startup(() => {
  Tracker.autorun((tracker) => {
    if (Meteor.user() != null) {
      tracker.stop();

      const language = FlowRouter.current().params.language;
      const myLanguage = Meteor.user().profile.language;

      if (language != myLanguage) {
        FlowRouter.withReplaceState(() => {
          FlowRouter.setParams({ language: myLanguage });
        });
      }

      if (TAPi18n.getLanguage() != myLanguage) {
        TAPi18n.setLanguage(myLanguage);
      }

      if (moment.locale() != myLanguage) {
{'fraction_non_alphanumeric': 0.14950166112956811, 'fraction_numerical': 0.0106312292358804, 'mean_word_length': 3.230337078651685, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2212364', 'n_tokens_mistral': 505, 'n_tokens_neox': 469, 'n_words': 91}