export const ([\w_]+) =(?:\n | )'([\w_\/]+)';
export type $1_TYPE = '$2';\nexport const $1: $1_TYPE = '$2';
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable no-bitwise */ | |
// ISC License | |
// Copyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov | |
// Permission to use, copy, modify, and/or distribute this software for any | |
// purpose with or without fee is hereby granted, provided that the above | |
// copyright notice and this permission notice appear in all copies. | |
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// jaz's CS:GO config | |
// Updated 2017-10-04 | |
// Rates | |
rate "786432" // max rate | |
cl_cmdrate "128" | |
cl_updaterate "128" | |
cl_interp "0.0" | |
cl_interp_ratio "1" | |
cl_interpolate "1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { | |
Text, | |
View, | |
} from 'react-native'; | |
// Import i18next to get it's translation feature | |
import i18n from 'i18next'; | |
const MyComponent = () => ( | |
<View> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-env node, es6 */ | |
// This is a quick 'n' dirty script to create the translation.json bundle. | |
// It crawls the locales folder and each locales subfolder and appends all namespaces to the bundle. | |
const fs = require('fs'); | |
const path = require('path'); | |
const localesPath = path.resolve(__dirname, '..', 'locales'); | |
const outputPath = path.resolve(__dirname, '..', 'translation.json'); | |
const json = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"loading": "Loading", | |
"error": "There was an error", | |
"welcome": "Welcome to the app!" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
// Import the i18n bundle | |
import './i18n'; | |
// Rest of the app setup | |
import { Provider } from 'react-redux'; | |
import App from './App'; | |
import configureStore from './configureStore'; | |
const store = configureStore(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import i18n from 'i18next'; | |
import i18nextReactNative from 'i18next-react-native-language-detector'; | |
// Path to your translation bundle | |
import translation from '../translation.json'; | |
i18n | |
.use(i18nextReactNative) // set to use the React Native locale detector | |
.init({ // look up these properties in the i18next documentation | |
fallbackLng: 'en', | |
debug: false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Your snippets | |
# | |
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to | |
# expand the prefix into a larger code block with templated values. | |
# | |
# You can create a new snippet in this file by typing "snip" and then hitting | |
# tab. | |
# | |
# An example CoffeeScript snippet to expand log to console.log: | |
# |