update lbryinc head
This commit is contained in:
parent
c0b810ba8d
commit
f9ee88e3ee
6 changed files with 19 additions and 6 deletions
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -5649,8 +5649,8 @@
|
|||
}
|
||||
},
|
||||
"lbryinc": {
|
||||
"version": "github:lbryio/lbryinc#27b6fcb8391b54cc9ea4d0a52a6ee536e39aa166",
|
||||
"from": "github:lbryio/lbryinc#27b6fcb8391b54cc9ea4d0a52a6ee536e39aa166",
|
||||
"version": "github:lbryio/lbryinc#69fcd910a61f191e6eae1bdb0baf0e55bae7cf5f",
|
||||
"from": "github:lbryio/lbryinc#69fcd910a61f191e6eae1bdb0baf0e55bae7cf5f",
|
||||
"requires": {
|
||||
"reselect": "^3.0.0"
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
"@expo/vector-icons": "^8.1.0",
|
||||
"gfycat-style-urls": "^1.0.3",
|
||||
"lbry-redux": "lbryio/lbry-redux#8ac92e3abfa0a9aacdb2fa4a144c3fadc4da6b11",
|
||||
"lbryinc": "lbryio/lbryinc#27b6fcb8391b54cc9ea4d0a52a6ee536e39aa166",
|
||||
"lbryinc": "lbryio/lbryinc#69fcd910a61f191e6eae1bdb0baf0e55bae7cf5f",
|
||||
"lodash": ">=4.17.11",
|
||||
"merge": ">=1.2.1",
|
||||
"moment": "^2.22.1",
|
||||
|
|
16
src/i18n.js
16
src/i18n.js
|
@ -1,4 +1,5 @@
|
|||
import { NativeModules, Platform } from 'react-native';
|
||||
import { doTransifexUpload } from 'lbryinc';
|
||||
import RNFS from 'react-native-fs';
|
||||
|
||||
const isProduction = !__DEV__; // eslint-disable-line no-undef
|
||||
|
@ -8,7 +9,6 @@ window.i18n_messages = window.i18n_messages || {};
|
|||
|
||||
function saveMessage(message) {
|
||||
const messagesFilePath = RNFS.ExternalDirectoryPath + '/app-strings.json';
|
||||
console.log(messagesFilePath);
|
||||
|
||||
if (knownMessages === null) {
|
||||
RNFS.readFile(messagesFilePath, 'utf8')
|
||||
|
@ -33,7 +33,18 @@ function checkMessageAndSave(message, messagesFilePath) {
|
|||
RNFS.writeFile(messagesFilePath, contents, 'utf8')
|
||||
.then(() => {
|
||||
// successful write
|
||||
// send to transifex
|
||||
|
||||
// send to transifex (should we do this even if the file doesn't get saved?)
|
||||
doTransifexUpload(
|
||||
contents,
|
||||
'lbry-mobile',
|
||||
() => {
|
||||
/* successful */
|
||||
},
|
||||
err => {
|
||||
/* failed */
|
||||
}
|
||||
);
|
||||
})
|
||||
.catch(err => {
|
||||
if (err) {
|
||||
|
@ -49,7 +60,6 @@ export function __(message, tokens) {
|
|||
? NativeModules.I18nManager.localeIdentifier
|
||||
: NativeModules.SettingsManager.settings.AppleLocale;
|
||||
language = language ? language.substring(0, 2) : 'en';
|
||||
console.log('LANG=' + language);
|
||||
|
||||
if (!isProduction) {
|
||||
saveMessage(message);
|
||||
|
|
|
@ -46,6 +46,7 @@ import TagSearch from 'component/tagSearch';
|
|||
import UriBar from 'component/uriBar';
|
||||
import publishStyle from 'styles/publish';
|
||||
import { navigateToUri, logPublish, uploadImageAsset } from 'utils/helper';
|
||||
import { __ } from 'i18n';
|
||||
|
||||
const languages = {
|
||||
en: __('English'),
|
||||
|
|
|
@ -13,6 +13,7 @@ import PropTypes from 'prop-types';
|
|||
import Colors from 'styles/colors';
|
||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||
import splashStyle from 'styles/splash';
|
||||
import { __ } from 'i18n';
|
||||
|
||||
const BLOCK_HEIGHT_INTERVAL = 1000 * 60 * 2.5; // every 2.5 minutes
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ import FloatingWalletBalance from 'component/floatingWalletBalance';
|
|||
import Icon from 'react-native-vector-icons/FontAwesome5';
|
||||
import UriBar from 'component/uriBar';
|
||||
import discoverStyle from 'styles/discover';
|
||||
import { __ } from 'i18n';
|
||||
|
||||
const TRENDING_FOR_ITEMS = [
|
||||
{ icon: 'globe-americas', name: 'everyone', label: __('Everyone') },
|
||||
|
|
Loading…
Add table
Reference in a new issue