gabsocial --> soapbox paths
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
azure: styles/azure.scss
|
||||
purple: styles/gabsocial-light.scss
|
||||
purple: styles/soapbox-light.scss
|
||||
purple-dark: styles/application.scss
|
||||
purple-contrast: styles/contrast.scss
|
||||
halloween: styles/halloween.scss
|
||||
|
||||
@ -7,7 +7,7 @@ const path = require('path');
|
||||
const rimraf = require('rimraf');
|
||||
const mkdirp = require('mkdirp');
|
||||
|
||||
const localesJsonPath = path.join(__dirname, '../app/gabsocial/locales');
|
||||
const localesJsonPath = path.join(__dirname, '../app/soapbox/locales');
|
||||
const locales = fs.readdirSync(localesJsonPath).filter(filename => {
|
||||
return /\.json$/.test(filename) &&
|
||||
!/defaultMessages/.test(filename) &&
|
||||
@ -28,7 +28,7 @@ locales.forEach(locale => {
|
||||
// first try react-intl
|
||||
`../../node_modules/react-intl/locale-data/${baseLocale}.js`,
|
||||
// then check locales/locale-data
|
||||
`../../app/gabsocial/locales/locale-data/${baseLocale}.js`,
|
||||
`../../app/soapbox/locales/locale-data/${baseLocale}.js`,
|
||||
// fall back to English (this is what react-intl does anyway)
|
||||
'../../node_modules/react-intl/locale-data/en.js',
|
||||
].filter(filename => fs.existsSync(path.join(outPath, filename)))
|
||||
@ -38,9 +38,9 @@ locales.forEach(locale => {
|
||||
// locale_${locale}.js
|
||||
// automatically generated by generateLocalePacks.js
|
||||
//
|
||||
import messages from '../../app/gabsocial/locales/${locale}.json';
|
||||
import messages from '../../app/soapbox/locales/${locale}.json';
|
||||
import localeData from ${JSON.stringify(localeDataPath)};
|
||||
import { setLocale } from '../../app/gabsocial/locales';
|
||||
import { setLocale } from '../../app/soapbox/locales';
|
||||
setLocale({messages, localeData});
|
||||
`;
|
||||
fs.writeFileSync(localePath, localeContent, 'utf8');
|
||||
|
||||
@ -97,8 +97,8 @@ module.exports = merge(sharedConfig, {
|
||||
'**/*.woff',
|
||||
],
|
||||
// ServiceWorker: {
|
||||
// entry: `imports-loader?ATTACHMENT_HOST=>${encodeURIComponent(JSON.stringify(attachmentHost))}!${encodeURI(path.join(__dirname, '../app/gabsocial/service_worker/entry.js'))}`,
|
||||
// cacheName: 'gabsocial',
|
||||
// entry: `imports-loader?ATTACHMENT_HOST=>${encodeURIComponent(JSON.stringify(attachmentHost))}!${encodeURI(path.join(__dirname, '../app/soapbox/service_worker/entry.js'))}`,
|
||||
// cacheName: 'soapbox',
|
||||
// output: '../assets/sw.js',
|
||||
// publicPath: '/sw.js',
|
||||
// minify: true,
|
||||
|
||||
@ -6,7 +6,7 @@ const { default: manageTranslations, readMessageFiles } = require('react-intl-t
|
||||
const RFC5646_REGEXP = /^[a-z]{2,3}(?:-(?:x|[A-Za-z]{2,4}))*$/;
|
||||
|
||||
const rootDirectory = path.resolve(__dirname, '..');
|
||||
const translationsDirectory = path.resolve(rootDirectory, 'app', 'gabsocial', 'locales');
|
||||
const translationsDirectory = path.resolve(rootDirectory, 'app', 'soapbox', 'locales');
|
||||
const messagesDirectory = path.resolve(rootDirectory, 'build', 'messages');
|
||||
const availableLanguages = fs.readdirSync(translationsDirectory).reduce((languages, filename) => {
|
||||
const basename = path.basename(filename, '.json');
|
||||
|
||||
Reference in New Issue
Block a user