Compare commits

..

9 Commits
main ... 5.33.x

Author SHA1 Message Date
Fedor Indutnyy db520339f3 v5.33.0 2022-02-23 17:22:56 -08:00
Fedor Indutnyy e923060b83 Update translations 2022-02-23 17:22:37 -08:00
automated-signal 3d0abbe354
updateGroup: Update group attributes last, after notifications are added
Co-authored-by: Scott Nonnenberg <scott@signal.org>
2022-02-23 12:25:50 -08:00
automated-signal 5c8cc2dc94
Use browser time formatting instead of Moment
Co-authored-by: Evan Hahn <69474926+EvanHahn-Signal@users.noreply.github.com>
2022-02-23 10:42:51 -08:00
automated-signal c88f10bac2
Improve conversion between typed arrays
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
2022-02-22 18:39:03 -08:00
automated-signal 733fc56742
Remove setup menu items after QR code linking
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
2022-02-22 18:38:52 -08:00
automated-signal dd12c6f599
envelopeTypeToCiphertextType: Handle all envelope types
Co-authored-by: Scott Nonnenberg <scott@signal.org>
2022-02-22 17:04:18 -08:00
automated-signal 9f42aa3e72
Drop GV1 records when GV2 records are present
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
2022-02-22 16:08:25 -08:00
automated-signal 4769f73b6a
Fix z-index on group calling overflow scroll buttons
Co-authored-by: Evan Hahn <69474926+EvanHahn-Signal@users.noreply.github.com>
2022-02-17 09:51:43 -08:00
1414 changed files with 487966 additions and 482050 deletions

View File

@ -1,3 +1,4 @@
build/**
components/** components/**
coverage/** coverage/**
dist/** dist/**
@ -14,17 +15,19 @@ libtextsecure/components.js
libtextsecure/test/test.js libtextsecure/test/test.js
test/test.js test/test.js
sticker-creator/dist/** sticker-creator/dist/**
ts/protobuf/compiled.d.ts
# Third-party files # Third-party files
js/Mp3LameEncoder.min.js js/Mp3LameEncoder.min.js
js/WebAudioRecorderMp3.js js/WebAudioRecorderMp3.js
js/libphonenumber-util.js
# TypeScript generated files # TypeScript generated files
app/**/*.js app/**/*.js
ts/**/*.js ts/**/*.js
sticker-creator/**/*.js sticker-creator/**/*.js
!sticker-creator/preload.js
**/*.d.ts
.eslintrc.js .eslintrc.js
webpack.config.ts webpack.config.ts
preload.bundle.* preload.bundle.*

View File

@ -15,14 +15,6 @@ const rules = {
}, },
], ],
// No omitting braces, keep on the same line
'brace-style': ['error', '1tbs', { allowSingleLine: false }],
curly: ['error', 'all'],
// Always use === and !== except when directly comparing to null
// (which only will equal null or undefined)
eqeqeq: ['error', 'always', { null: 'never' }],
// prevents us from accidentally checking in exclusive tests (`.only`): // prevents us from accidentally checking in exclusive tests (`.only`):
'mocha/no-exclusive-tests': 'error', 'mocha/no-exclusive-tests': 'error',
@ -36,9 +28,6 @@ const rules = {
// useful for unused or internal fields // useful for unused or internal fields
'no-underscore-dangle': 'off', 'no-underscore-dangle': 'off',
// Temp: We have because TypeScript's `allowUnreachableCode` option is on.
'no-unreachable': 'error',
// though we have a logger, we still remap console to log to disk // though we have a logger, we still remap console to log to disk
'no-console': 'error', 'no-console': 'error',
@ -120,19 +109,12 @@ const rules = {
'`with` is disallowed in strict mode because it makes code impossible to predict and optimize.', '`with` is disallowed in strict mode because it makes code impossible to predict and optimize.',
}, },
], ],
curly: 'error',
}; };
const typescriptRules = { const typescriptRules = {
...rules, ...rules,
// Override brace style to enable typescript-specific syntax
'brace-style': 'off',
'@typescript-eslint/brace-style': [
'error',
'1tbs',
{ allowSingleLine: false },
],
'@typescript-eslint/array-type': ['error', { default: 'generic' }], '@typescript-eslint/array-type': ['error', { default: 'generic' }],
'no-restricted-imports': 'off', 'no-restricted-imports': 'off',
@ -185,14 +167,7 @@ module.exports = {
overrides: [ overrides: [
{ {
files: [ files: ['ts/**/*.ts', 'ts/**/*.tsx', 'app/**/*.ts'],
'ts/**/*.ts',
'ts/**/*.tsx',
'app/**/*.ts',
'sticker-creator/**/*.ts',
'sticker-creator/**/*.tsx',
'build/intl-linter/**/*.ts',
],
parser: '@typescript-eslint/parser', parser: '@typescript-eslint/parser',
parserOptions: { parserOptions: {
project: 'tsconfig.json', project: 'tsconfig.json',
@ -212,12 +187,27 @@ module.exports = {
rules: typescriptRules, rules: typescriptRules,
}, },
{ {
files: [ files: ['sticker-creator/**/*.ts', 'sticker-creator/**/*.tsx'],
'**/*.stories.tsx', parser: '@typescript-eslint/parser',
'ts/build/**', parserOptions: {
'ts/test-*/**', project: './sticker-creator/tsconfig.json',
'build/intl-linter/**/*.ts', ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'airbnb-typescript-prettier',
], ],
rules: typescriptRules,
},
{
files: ['**/*.stories.tsx', 'ts/build/**', 'ts/test-*/**'],
rules: { rules: {
...typescriptRules, ...typescriptRules,
'import/no-extraneous-dependencies': 'off', 'import/no-extraneous-dependencies': 'off',
@ -227,6 +217,4 @@ module.exports = {
], ],
rules, rules,
reportUnusedDisableDirectives: true,
}; };

View File

@ -16,7 +16,7 @@ contact_links:
url: https://community.signalusers.org/c/support/ url: https://community.signalusers.org/c/support/
about: Feel free to ask anything about: Feel free to ask anything
- name: 📖 Contribution instructions - name: 📖 Contribution instructions
url: https://github.com/signalapp/Signal-Desktop/blob/main/CONTRIBUTING.md url: https://github.com/signalapp/Signal-Desktop/blob/development/CONTRIBUTING.md
about: Want to contribute to Signal Desktop? Start here. about: Want to contribute to Signal Desktop? Start here.
- name: ❓ Other issue? - name: ❓ Other issue?
url: https://community.signalusers.org/ url: https://community.signalusers.org/

View File

@ -14,9 +14,9 @@ Remember, you can preview this before saving it.
### Contributor checklist: ### Contributor checklist:
- [ ] My contribution is **not** related to translations. - [ ] My contribution is **not** related to translations. _Please submit translation changes via our [Signal Desktop Transifex project](https://www.transifex.com/signalapp/signal-desktop/)._
- [ ] My commits are in nice logical chunks with [good commit messages](http://chris.beams.io/posts/git-commit/) - [ ] My commits are in nice logical chunks with [good commit messages](http://chris.beams.io/posts/git-commit/)
- [ ] My changes are [rebased](https://medium.com/free-code-camp/git-rebase-and-the-golden-rule-explained-70715eccc372) on the latest [`main`](https://github.com/signalapp/Signal-Desktop/tree/main) branch - [ ] My changes are [rebased](https://medium.com/free-code-camp/git-rebase-and-the-golden-rule-explained-70715eccc372) on the latest [`development`](https://github.com/signalapp/Signal-Desktop/tree/development) branch
- [ ] A `yarn ready` run passes successfully ([more about tests here](https://github.com/signalapp/Signal-Desktop/blob/master/CONTRIBUTING.md#tests)) - [ ] A `yarn ready` run passes successfully ([more about tests here](https://github.com/signalapp/Signal-Desktop/blob/master/CONTRIBUTING.md#tests))
- [ ] My changes are ready to be shipped to users - [ ] My changes are ready to be shipped to users

View File

@ -1,4 +1,4 @@
# Copyright 2021-2022 Signal Messenger, LLC # Copyright 2021 Signal Messenger, LLC
# SPDX-License-Identifier: AGPL-3.0-only # SPDX-License-Identifier: AGPL-3.0-only
name: Backport name: Backport
@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v2
with: with:
token: ${{ secrets.AUTOMATED_GITHUB_PAT }} token: ${{ secrets.AUTOMATED_GITHUB_PAT }}
repository: signalapp/Signal-Backport-Action-Private repository: signalapp/Signal-Backport-Action-Private

View File

@ -1,4 +1,4 @@
# Copyright 2020-2022 Signal Messenger, LLC # Copyright 2020-2021 Signal Messenger, LLC
# SPDX-License-Identifier: AGPL-3.0-only # SPDX-License-Identifier: AGPL-3.0-only
name: Benchmark name: Benchmark
@ -6,7 +6,6 @@ on:
push: push:
branches: branches:
- development - development
- main
- '[0-9]+.[0-9]+.x' - '[0-9]+.[0-9]+.x'
pull_request: pull_request:
@ -14,7 +13,6 @@ jobs:
linux: linux:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ github.repository == 'signalapp/Signal-Desktop-Private' }} if: ${{ github.repository == 'signalapp/Signal-Desktop-Private' }}
timeout-minutes: 30
steps: steps:
- name: Get system specs - name: Get system specs
@ -23,12 +21,12 @@ jobs:
run: uname -a run: uname -a
- name: Clone Desktop repo - name: Clone Desktop repo
uses: actions/checkout@v3 uses: actions/checkout@v2
- name: Setup node.js - name: Setup node.js
uses: actions/setup-node@v3 uses: actions/setup-node@v2
with: with:
node-version: '16.15.0' node-version: '16.9.1'
- name: Install global dependencies - name: Install global dependencies
run: npm install -g yarn@1.22.10 run: npm install -g yarn@1.22.10
@ -37,7 +35,7 @@ jobs:
- name: Cache Desktop node_modules - name: Cache Desktop node_modules
id: cache-desktop-modules id: cache-desktop-modules
uses: actions/cache@v3 uses: actions/cache@v2
with: with:
path: node_modules path: node_modules
key: ${{ runner.os }}-${{ hashFiles('package.json', 'yarn.lock', 'patches/**') }} key: ${{ runner.os }}-${{ hashFiles('package.json', 'yarn.lock', 'patches/**') }}
@ -51,6 +49,9 @@ jobs:
- name: Bundle - name: Bundle
run: yarn build:webpack run: yarn build:webpack
- name: Setup hosts
run: sudo echo "127.0.0.1 mock.signal.org" | sudo tee -a /etc/hosts
- name: Run startup benchmarks - name: Run startup benchmarks
run: | run: |
set -o pipefail set -o pipefail
@ -61,7 +62,6 @@ jobs:
NODE_ENV: production NODE_ENV: production
RUN_COUNT: 10 RUN_COUNT: 10
ELECTRON_ENABLE_STACK_DUMPING: on ELECTRON_ENABLE_STACK_DUMPING: on
ARTIFACTS_DIR: artifacts/startup
- name: Run send benchmarks - name: Run send benchmarks
run: | run: |
@ -74,7 +74,6 @@ jobs:
NODE_ENV: production NODE_ENV: production
RUN_COUNT: 100 RUN_COUNT: 100
ELECTRON_ENABLE_STACK_DUMPING: on ELECTRON_ENABLE_STACK_DUMPING: on
ARTIFACTS_DIR: artifacts/send
- name: Run group send benchmarks - name: Run group send benchmarks
run: | run: |
@ -88,7 +87,6 @@ jobs:
NODE_ENV: production NODE_ENV: production
RUN_COUNT: 100 RUN_COUNT: 100
ELECTRON_ENABLE_STACK_DUMPING: on ELECTRON_ENABLE_STACK_DUMPING: on
ARTIFACTS_DIR: artifacts/group-send
- name: Run conversation open benchmarks - name: Run conversation open benchmarks
run: | run: |
@ -102,17 +100,9 @@ jobs:
NODE_ENV: production NODE_ENV: production
RUN_COUNT: 100 RUN_COUNT: 100
ELECTRON_ENABLE_STACK_DUMPING: on ELECTRON_ENABLE_STACK_DUMPING: on
ARTIFACTS_DIR: artifacts/convo-open
- name: Upload benchmark logs on failure
if: failure()
uses: actions/upload-artifact@v3
with:
name: logs
path: artifacts
- name: Clone benchmark repo - name: Clone benchmark repo
uses: actions/checkout@v3 uses: actions/checkout@v2
with: with:
repository: 'signalapp/Signal-Desktop-Benchmarks-Private' repository: 'signalapp/Signal-Desktop-Benchmarks-Private'
path: 'benchmark-results' path: 'benchmark-results'

View File

@ -1,4 +1,4 @@
# Copyright 2020-2022 Signal Messenger, LLC # Copyright 2020-2021 Signal Messenger, LLC
# SPDX-License-Identifier: AGPL-3.0-only # SPDX-License-Identifier: AGPL-3.0-only
name: CI name: CI
@ -6,27 +6,25 @@ on:
push: push:
branches: branches:
- development - development
- main
- '[0-9]+.[0-9]+.x' - '[0-9]+.[0-9]+.x'
pull_request: pull_request:
jobs: jobs:
lint: lint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 30
steps: steps:
- run: lsb_release -a - run: lsb_release -a
- run: uname -a - run: uname -a
- uses: actions/checkout@v3 - uses: actions/checkout@v2
- uses: actions/setup-node@v3 - uses: actions/setup-node@v2
with: with:
node-version: '16.15.0' node-version: '16.9.1'
- run: npm install -g yarn@1.22.10 - run: npm install -g yarn@1.22.10
- name: Cache Desktop node_modules - name: Cache Desktop node_modules
id: cache-desktop-modules id: cache-desktop-modules
uses: actions/cache@v3 uses: actions/cache@v2
with: with:
path: node_modules path: node_modules
key: ${{ runner.os }}-${{ hashFiles('package.json', 'yarn.lock', 'patches/**') }} key: ${{ runner.os }}-${{ hashFiles('package.json', 'yarn.lock', 'patches/**') }}
@ -42,21 +40,20 @@ jobs:
macos: macos:
needs: lint needs: lint
runs-on: macos-latest runs-on: macos-11.0
if: github.ref == 'refs/heads/development' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' if: github.ref == 'refs/heads/development' || github.ref == 'refs/heads/master'
timeout-minutes: 30
steps: steps:
- run: uname -a - run: uname -a
- uses: actions/checkout@v3 - uses: actions/checkout@v2
- uses: actions/setup-node@v3 - uses: actions/setup-node@v2
with: with:
node-version: '16.15.0' node-version: '16.9.1'
- run: npm install -g yarn@1.22.10 - run: npm install -g yarn@1.22.10
- name: Cache Desktop node_modules - name: Cache Desktop node_modules
id: cache-desktop-modules id: cache-desktop-modules
uses: actions/cache@v3 uses: actions/cache@v2
with: with:
path: node_modules path: node_modules
key: ${{ runner.os }}-${{ hashFiles('package.json', 'yarn.lock', 'patches/**') }} key: ${{ runner.os }}-${{ hashFiles('package.json', 'yarn.lock', 'patches/**') }}
@ -66,14 +63,13 @@ jobs:
- run: yarn generate - run: yarn generate
- run: yarn prepare-beta-build - run: yarn prepare-beta-build
- run: yarn test-node
- run: yarn test-electron
timeout-minutes: 5
- run: yarn build - run: yarn build
env: env:
DISABLE_INSPECT_FUSE: on DISABLE_INSPECT_FUSE: on
- name: Rebuild native modules for x64 - name: Rebuild native modules for x64
run: yarn electron:install-app-deps run: yarn electron:install-app-deps
- run: yarn test-node
- run: yarn test-electron
- run: yarn test-release - run: yarn test-release
env: env:
NODE_ENV: production NODE_ENV: production
@ -81,21 +77,20 @@ jobs:
linux: linux:
needs: lint needs: lint
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 30
steps: steps:
- run: lsb_release -a - run: lsb_release -a
- run: uname -a - run: uname -a
- uses: actions/checkout@v3 - uses: actions/checkout@v2
- uses: actions/setup-node@v3 - uses: actions/setup-node@v2
with: with:
node-version: '16.15.0' node-version: '16.9.1'
- run: sudo apt-get install xvfb - run: sudo apt-get install xvfb
- run: npm install -g yarn@1.22.10 - run: npm install -g yarn@1.22.10
- name: Cache Desktop node_modules - name: Cache Desktop node_modules
id: cache-desktop-modules id: cache-desktop-modules
uses: actions/cache@v3 uses: actions/cache@v2
with: with:
path: node_modules path: node_modules
key: ${{ runner.os }}-${{ hashFiles('package.json', 'yarn.lock', 'patches/**') }} key: ${{ runner.os }}-${{ hashFiles('package.json', 'yarn.lock', 'patches/**') }}
@ -110,7 +105,6 @@ jobs:
DISABLE_INSPECT_FUSE: on DISABLE_INSPECT_FUSE: on
- run: xvfb-run --auto-servernum yarn test-node - run: xvfb-run --auto-servernum yarn test-node
- run: xvfb-run --auto-servernum yarn test-electron - run: xvfb-run --auto-servernum yarn test-electron
timeout-minutes: 5
env: env:
LANG: en_US LANG: en_US
LANGUAGE: en_US LANGUAGE: en_US
@ -121,21 +115,20 @@ jobs:
windows: windows:
needs: lint needs: lint
runs-on: windows-latest runs-on: windows-latest
timeout-minutes: 30
steps: steps:
- run: systeminfo - run: systeminfo
- run: git config --global core.autocrlf false - run: git config --global core.autocrlf false
- run: git config --global core.eol lf - run: git config --global core.eol lf
- uses: actions/checkout@v3 - uses: actions/checkout@v2
- uses: actions/setup-node@v3 - uses: actions/setup-node@v2
with: with:
node-version: '16.15.0' node-version: '16.9.1'
- run: npm install -g yarn@1.22.10 - run: npm install -g yarn@1.22.10
- name: Cache Desktop node_modules - name: Cache Desktop node_modules
id: cache-desktop-modules id: cache-desktop-modules
uses: actions/cache@v3 uses: actions/cache@v2
with: with:
path: node_modules path: node_modules
key: ${{ runner.os }}-${{ hashFiles('package.json', 'yarn.lock', 'patches/**') }} key: ${{ runner.os }}-${{ hashFiles('package.json', 'yarn.lock', 'patches/**') }}
@ -153,16 +146,14 @@ jobs:
env: env:
DISABLE_INSPECT_FUSE: on DISABLE_INSPECT_FUSE: on
- run: yarn test-electron - run: yarn test-electron
timeout-minutes: 5
- run: yarn test-release - run: yarn test-release
env: env:
SIGNAL_ENV: production SIGNAL_ENV: production
mock-tests: storage-service:
needs: lint needs: lint
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ github.repository == 'signalapp/Signal-Desktop-Private' }} if: ${{ github.repository == 'signalapp/Signal-Desktop-Private' }}
timeout-minutes: 30
steps: steps:
- name: Get system specs - name: Get system specs
@ -171,12 +162,12 @@ jobs:
run: uname -a run: uname -a
- name: Clone Desktop repo - name: Clone Desktop repo
uses: actions/checkout@v3 uses: actions/checkout@v2
- name: Setup node.js - name: Setup node.js
uses: actions/setup-node@v3 uses: actions/setup-node@v2
with: with:
node-version: '16.15.0' node-version: '16.9.1'
- name: Install global dependencies - name: Install global dependencies
run: npm install -g yarn@1.22.10 run: npm install -g yarn@1.22.10
@ -185,7 +176,7 @@ jobs:
- name: Cache Desktop node_modules - name: Cache Desktop node_modules
id: cache-desktop-modules id: cache-desktop-modules
uses: actions/cache@v3 uses: actions/cache@v2
with: with:
path: node_modules path: node_modules
key: ${{ runner.os }}-${{ hashFiles('package.json', 'yarn.lock', 'patches/**') }} key: ${{ runner.os }}-${{ hashFiles('package.json', 'yarn.lock', 'patches/**') }}
@ -199,19 +190,14 @@ jobs:
- name: Bundle - name: Bundle
run: yarn build:webpack run: yarn build:webpack
- name: Run mock server tests - name: Setup hosts
run: sudo echo "127.0.0.1 mock.signal.org" | sudo tee -a /etc/hosts
- name: Run storage service tests
run: | run: |
set -o pipefail set -o pipefail
xvfb-run --auto-servernum yarn test-mock xvfb-run --auto-servernum yarn test-mock
timeout-minutes: 10 timeout-minutes: 10
env: env:
NODE_ENV: production NODE_ENV: production
DEBUG: mock:test:* DEBUG: mock:test-storage
ARTIFACTS_DIR: artifacts/startup
- name: Upload mock server test logs on failure
if: failure()
uses: actions/upload-artifact@v2
with:
name: logs
path: artifacts

View File

@ -1,32 +0,0 @@
# Copyright 2020-2022 Signal Messenger, LLC
# SPDX-License-Identifier: AGPL-3.0-only
name: CI
on:
pull_request:
jobs:
danger:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # fetch all history
- uses: actions/setup-node@v3
with:
node-version: '16.15.0'
- run: npm install -g yarn@1.22.10
- name: Cache danger node_modules
id: cache-desktop-modules
uses: actions/cache@v3
with:
path: danger/node_modules
key: danger-${{ runner.os }}-${{ hashFiles('danger/package.json', 'danger/yarn.lock') }}
- name: Install danger node_modules
if: steps.cache-desktop-modules.outputs.cache-hit != 'true'
run: cd danger && yarn install --frozen-lockfile
- name: Run DangerJS
run: yarn danger:ci
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.AUTOMATED_GITHUB_PAT }}

3
.gitignore vendored
View File

@ -1,5 +1,4 @@
node_modules node_modules
node_modules_bkp
.sass-cache .sass-cache
coverage/* coverage/*
build/curve25519_compiled.js build/curve25519_compiled.js
@ -17,7 +16,6 @@ release/
/start.sh /start.sh
.eslintcache .eslintcache
tsconfig.tsbuildinfo tsconfig.tsbuildinfo
.smartling-source.sh
# generated files # generated files
js/components.js js/components.js
@ -39,7 +37,6 @@ sticker-creator/**/*.js
# Sticker Creator # Sticker Creator
sticker-creator/dist/* sticker-creator/dist/*
sticker-creator/**/*.js
# Editors # Editors
/.idea /.idea

2
.nvmrc
View File

@ -1 +1 @@
16.15.0 16.9.1

View File

@ -3,7 +3,6 @@
# Generated files # Generated files
app/**/*.js app/**/*.js
sticker-creator/**/*.js
config/local-*.json config/local-*.json
config/local.json config/local.json
dist/** dist/**
@ -35,6 +34,12 @@ js/WebAudioRecorderMp3.js
# Github workflows # Github workflows
.github/** .github/**
# Managed by Transifex:
# Note: the negate pattern only works because it's targeting the same depth as the
# glob on the previous line.
_locales/**/*.json
!_locales/en/messages.json
# Managed by package manager (`bower` and `yarn`/`npm`): # Managed by package manager (`bower` and `yarn`/`npm`):
/bower.json /bower.json
/package.json /package.json

View File

@ -1,9 +0,0 @@
#!/bin/bash
# Copyright 2022 Signal Messenger, LLC
# SPDX-License-Identifier: AGPL-3.0-only
# run this before yarn get-strings/push-strings:
# source .smartling-source.sh
export SMARTLING_USER="your token 'user identifier' here"
export SMARTLING_SECRET="your token secret here"

View File

@ -1,7 +0,0 @@
# Copyright 2022 Signal Messenger, LLC
# SPDX-License-Identifier: AGPL-3.0-only
# https://github.com/Smartling/smartling-cli/wiki/examples.md
account_id: '92ff14ad'
project_id: 'ef62d1ebb'

5
.storybook/addons.js Normal file
View File

@ -0,0 +1,5 @@
// Copyright 2019-2020 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import '@storybook/addon-knobs/register';
import '@storybook/addon-actions/register';

141
.storybook/config.js Normal file
View File

@ -0,0 +1,141 @@
// Copyright 2019-2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import * as React from 'react';
import { addDecorator, addParameters, configure } from '@storybook/react';
import { withKnobs, boolean, optionsKnob } from '@storybook/addon-knobs';
import classnames from 'classnames';
import * as styles from './styles.scss';
import messages from '../_locales/en/messages.json';
import { I18n } from '../sticker-creator/util/i18n';
import { ThemeType } from '../ts/types/Util';
import { ClassyProvider } from '../ts/components/PopperRootContext';
import { StorybookThemeContext } from './StorybookThemeContext';
const optionsConfig = {
display: 'inline-radio',
};
const persistKnob = id => knob => {
const value = knob(localStorage.getItem(id));
localStorage.setItem(id, value);
return value;
};
const makeThemeKnob = pane =>
persistKnob(`${pane}-pane-theme`)(localValue =>
optionsKnob(
`${pane} Pane Theme`,
{ Light: '', Dark: classnames('dark-theme', styles.darkTheme) },
localValue || '',
optionsConfig,
`${pane} Pane`
)
);
const parseThemeString = str => (str === '' ? ThemeType.light : ThemeType.dark);
const makeModeKnob = pane =>
persistKnob(`${pane}-pane-mode`)(localValue =>
optionsKnob(
`${pane} Pane Mode`,
{ Mouse: 'mouse-mode', Keyboard: 'keyboard-mode' },
localValue || 'mouse-mode',
optionsConfig,
`${pane} Pane`
)
);
addDecorator(withKnobs({ escapeHTML: false }));
addDecorator((storyFn /* , context */) => {
const contents = storyFn();
const firstPaneThemeString = makeThemeKnob('First');
const firstPaneTheme = parseThemeString(firstPaneThemeString);
const firstPaneMode = makeModeKnob('First');
const secondPane = persistKnob('second-pane-active')(localValue =>
boolean('Second Pane Active', localValue !== 'false', 'Second Pane')
);
const secondPaneThemeString = makeThemeKnob('Second');
const secondPaneTheme = parseThemeString(secondPaneThemeString);
const secondPaneMode = makeModeKnob('Second');
// Adding it to the body as well so that we can cover modals and other
// components that are rendered outside of this decorator container
if (firstPaneThemeString === '') {
document.body.classList.remove('dark-theme');
} else {
document.body.classList.add('dark-theme');
}
if (firstPaneMode === 'mouse-mode') {
document.body.classList.remove('keyboard-mode');
document.body.classList.add('mouse-mode');
} else {
document.body.classList.remove('mouse-mode');
document.body.classList.add('keyboard-mode');
}
document.body.classList.add('page-is-visible');
return (
<div className={styles.container}>
<StorybookThemeContext.Provider value={firstPaneTheme}>
<ClassyProvider themes={['dark']}>
<div
className={classnames(
styles.panel,
firstPaneThemeString,
firstPaneMode
)}
>
{contents}
</div>
</ClassyProvider>
</StorybookThemeContext.Provider>
{secondPane ? (
<div
className={classnames(
styles.panel,
secondPaneThemeString,
secondPaneMode
)}
>
<StorybookThemeContext.Provider value={secondPaneTheme}>
{contents}
</StorybookThemeContext.Provider>
</div>
) : null}
</div>
);
});
// Hack to enable hooks in stories: https://github.com/storybookjs/storybook/issues/5721#issuecomment-473869398
addDecorator(Story => <Story />);
addDecorator(story => <I18n messages={messages}>{story()}</I18n>);
addParameters({
axe: {
disabledRules: ['html-has-lang'],
},
});
configure(() => {
// Load main app stories
const tsComponentsContext = require.context(
'../ts/components',
true,
/\.stories.tsx?$/
);
tsComponentsContext.keys().forEach(f => tsComponentsContext(f));
// Load sticker creator stories
const stickerCreatorContext = require.context(
'../sticker-creator',
true,
/\.stories\.tsx?$/
);
stickerCreatorContext.keys().forEach(f => stickerCreatorContext(f));
}, module);

View File

@ -1,23 +0,0 @@
// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
module.exports = {
stories: [
'../ts/components/**/*.stories.tsx',
'../sticker-creator/**/*.stories.tsx',
],
addons: [
'@storybook/addon-a11y',
'@storybook/addon-actions',
'@storybook/addon-controls',
'@storybook/addon-measure',
'@storybook/addon-toolbars',
'@storybook/addon-viewport',
// This must be imported last.
'@storybook/addon-interactions',
// Deprecated! Please remove when all uses have been migrated to controls.
'@storybook/addon-knobs',
],
};

View File

@ -3,15 +3,7 @@
<!-- prettier-ignore --> <!-- prettier-ignore -->
<link rel="stylesheet" href="../stylesheets/manifest.css" /> <link rel="stylesheet" href="../stylesheets/manifest.css" />
<link
href="../node_modules/@indutny/frameless-titlebar/dist/styles.css"
rel="stylesheet"
type="text/css"
/>
<script> <script>
// eslint-disable-next-line
const noop = () => {};
window.SignalWindow = window.SignalWindow || {}; window.SignalWindow = window.SignalWindow || {};
window.SignalWindow.log = { window.SignalWindow.log = {
fatal: console.error.bind(console), fatal: console.error.bind(console),
@ -21,28 +13,4 @@
debug: console.debug.bind(console), debug: console.debug.bind(console),
trace: console.trace.bind(console), trace: console.trace.bind(console),
}; };
window.SignalContext = {
activeWindowService: {
isActive: () => true,
registerForActive: noop,
unregisterForActive: noop,
registerForChange: noop,
unregisterForChange: noop,
},
nativeThemeListener: {
getSystemValue: async () => 'light',
subscribe: noop,
unsubscribe: noop,
},
Settings: {
themeSetting: {
getValue: async () => 'light',
},
waitForChange: () => new Promise(noop),
},
OS: {
hasCustomTitleBar: () => false,
},
};
</script> </script>

View File

@ -1,87 +0,0 @@
// Copyright 2019-2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import React from 'react';
import classnames from 'classnames';
import { withKnobs, boolean, optionsKnob } from '@storybook/addon-knobs';
import * as styles from './styles.scss';
import messages from '../_locales/en/messages.json';
import { ClassyProvider } from '../ts/components/PopperRootContext';
import { I18n } from '../sticker-creator/util/i18n';
import { StorybookThemeContext } from './StorybookThemeContext';
import { ThemeType } from '../ts/types/Util';
export const globalTypes = {
mode: {
name: 'Mode',
description: 'Application mode',
defaultValue: 'mouse',
toolbar: {
dynamicTitle: true,
icon: 'circlehollow',
items: ['mouse', 'keyboard'],
showName: true,
},
},
theme: {
name: 'Theme',
description: 'Global theme for components',
defaultValue: 'light',
toolbar: {
dynamicTitle: true,
icon: 'circlehollow',
items: ['light', 'dark'],
showName: true,
},
},
};
const withModeAndThemeProvider = (Story, context) => {
const theme =
context.globals.theme === 'light' ? ThemeType.light : ThemeType.dark;
const mode = context.globals.mode;
// Adding it to the body as well so that we can cover modals and other
// components that are rendered outside of this decorator container
if (theme === 'light') {
document.body.classList.remove('dark-theme');
} else {
document.body.classList.add('dark-theme');
}
if (mode === 'mouse') {
document.body.classList.remove('keyboard-mode');
document.body.classList.add('mouse-mode');
} else {
document.body.classList.remove('mouse-mode');
document.body.classList.add('keyboard-mode');
}
document.body.classList.add('page-is-visible');
return (
<div className={styles.container}>
<StorybookThemeContext.Provider value={theme}>
<Story {...context} />
</StorybookThemeContext.Provider>
</div>
);
};
const withI18n = (Story, context) => (
<I18n messages={messages} locale="en">
<Story {...context} />
</I18n>
);
export const decorators = [
withModeAndThemeProvider,
withI18n,
];
export const parameters = {
axe: {
disabledRules: ['html-has-lang'],
},
};

View File

@ -4,10 +4,19 @@
@import '../stylesheets/variables'; @import '../stylesheets/variables';
.container { .container {
align-content: stretch; display: flex;
flex-direction: row;
align-items: stretch; align-items: stretch;
align-content: stretch;
width: 100vw;
height: 100vh;
}
.panel {
flex: 1;
padding: 16px;
height: 100%; height: 100%;
width: 100%; overflow: auto;
} }
.dark-theme { .dark-theme {

View File

@ -1,4 +1,4 @@
// Copyright 2019-2022 Signal Messenger, LLC // Copyright 2019-2020 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
const webpack = require('webpack'); const webpack = require('webpack');
@ -10,6 +10,11 @@ module.exports = ({ config }) => {
); );
config.module.rules.unshift( config.module.rules.unshift(
{
test: /\.[jt]sx?$/,
loader: 'babel-loader',
exclude: /node_modules/,
},
{ {
test: /\.scss$/, test: /\.scss$/,
loaders: [ loaders: [
@ -20,6 +25,8 @@ module.exports = ({ config }) => {
} }
); );
config.resolve.extensions = ['.tsx', '.ts', '.jsx', '.js'];
config.externals = { config.externals = {
net: 'net', net: 'net',
}; };

8
.tx/config Normal file
View File

@ -0,0 +1,8 @@
[main]
host = https://www.transifex.com
[signal-desktop.messagesjson-electron]
file_filter = _locales/<lang>/messages.json
source_file = _locales/en/messages.json
source_lang = en
type = CHROME

View File

@ -5,6 +5,7 @@ tests
powered-test powered-test
# asset directories # asset directories
docs
doc doc
website website
images images

View File

@ -5,15 +5,36 @@
Signal Desktop makes use of the following open source projects. Signal Desktop makes use of the following open source projects.
## @formatjs/fast-memoize ## @evanhahn/lottie-web-light
License: MIT The MIT License (MIT)
## @indutny/frameless-titlebar Copyright (c) 2022 Evan Hahn
MIT License Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Copyright (c) 2019 Cristian Ponce The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
************
Original lottie-web license:
The MIT License (MIT)
Copyright (c) 2015 Bodymovin
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
@ -887,53 +908,6 @@ Signal Desktop makes use of the following open source projects.
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
## dicer
Copyright Brian White. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
## direction
(The MIT License)
Copyright (c) 2014 Titus Wormer <tituswormer@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
## emoji-datasource ## emoji-datasource
The MIT License (MIT) The MIT License (MIT)
@ -2131,33 +2105,6 @@ Signal Desktop makes use of the following open source projects.
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE. OTHER DEALINGS IN THE SOFTWARE.
## mp4box
Copyright (c) 2012. Telecom ParisTech/TSI/MM/GPAC Cyril Concolato
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
## mustache ## mustache
The MIT License The MIT License
@ -2569,18 +2516,6 @@ Signal Desktop makes use of the following open source projects.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
## p-timeout
MIT License
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
## parchment ## parchment
Copyright (c) 2015, Jason Chen Copyright (c) 2015, Jason Chen
@ -2652,6 +2587,10 @@ Signal Desktop makes use of the following open source projects.
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.
## pino-multi-stream
License: MIT
## protobufjs ## protobufjs
This license applies to all parts of protobuf.js except those files This license applies to all parts of protobuf.js except those files
@ -2863,10 +2802,6 @@ Signal Desktop makes use of the following open source projects.
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.
## react-intl
License: BSD-3-Clause
## react-measure ## react-measure
The MIT License (MIT) The MIT License (MIT)
@ -2991,29 +2926,6 @@ Signal Desktop makes use of the following open source projects.
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.
## react-textarea-autosize
The MIT License (MIT)
Copyright (c) 2013 Andrey Popp
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
## react-virtualized ## react-virtualized
The MIT License (MIT) The MIT License (MIT)
@ -3182,6 +3094,30 @@ Signal Desktop makes use of the following open source projects.
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
## rotating-file-stream
The MIT License (MIT)
Copyright (c) 2015-2020 Daniele Ricci
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
## sanitize.css ## sanitize.css
License: CC0-1.0 License: CC0-1.0
@ -3449,9 +3385,7 @@ Signal Desktop makes use of the following open source projects.
## typeface-inter ## typeface-inter
Copyright (c) 2016-2020 The Inter Project Authors. Copyright (c) 2016-2018 The Inter Project Authors (me@rsms.me)
"Inter" is trademark of Rasmus Andersson.
https://github.com/rsms/inter
This Font Software is licensed under the SIL Open Font License, Version 1.1. This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at: This license is copied below, and is also available with a FAQ at:

View File

@ -1,4 +1,4 @@
<!-- Copyright 2015-2022 Signal Messenger, LLC --> <!-- Copyright 2015-2020 Signal Messenger, LLC -->
<!-- SPDX-License-Identifier: AGPL-3.0-only --> <!-- SPDX-License-Identifier: AGPL-3.0-only -->
# Contributor Guidelines # Contributor Guidelines
@ -13,15 +13,14 @@ It's a good idea to gauge interest in your intended work by finding the current
for it or creating a new one yourself. You can use also that issue as a place to signal for it or creating a new one yourself. You can use also that issue as a place to signal
your intentions and get feedback from the users most likely to appreciate your changes. your intentions and get feedback from the users most likely to appreciate your changes.
Once you've spent a little bit of time planning your solution, you can go Once you've spent a little bit of time planning your solution, it's a good idea to go
back to the issue and talk about your approach. We'd be happy to provide feedback. [An back to the issue and talk about your approach. We'd be happy to provide feedback. [An
ounce of prevention, as they say!](https://www.goodreads.com/quotes/247269-an-ounce-of-prevention-is-worth-a-pound-of-cure) ounce of prevention, as they say!](https://www.goodreads.com/quotes/247269-an-ounce-of-prevention-is-worth-a-pound-of-cure)
## Developer Setup ## Developer Setup
First, you'll need [Node.js](https://nodejs.org/) which matches our current version. First, you'll need [Node.js](https://nodejs.org/) which matches our current version.
You can check [`.nvmrc` in the `main` branch](https://github.com/signalapp/Signal-Desktop/blob/main/.nvmrc) You can check [`.nvmrc` in the `development` branch](https://github.com/signalapp/Signal-Desktop/blob/development/.nvmrc) to see what the current version is. If you have [nvm](https://github.com/creationix/nvm)
to see what the current version is. If you have [nvm](https://github.com/creationix/nvm)
you can just run `nvm use` in the project directory and it will switch to the project's you can just run `nvm use` in the project directory and it will switch to the project's
desired Node.js version. [nvm for windows](https://github.com/coreybutler/nvm-windows) is desired Node.js version. [nvm for windows](https://github.com/coreybutler/nvm-windows) is
still useful, but it doesn't support `.nvmrc` files. still useful, but it doesn't support `.nvmrc` files.
@ -48,16 +47,17 @@ Install the [Xcode Command-Line Tools](http://osxdaily.com/2014/02/12/install-co
1. Install `gcc` 1. Install `gcc`
1. Install `g++` 1. Install `g++`
1. Install `make` 1. Install `make`
1. Install `git-lfs`
### All platforms ### All platforms
Now, run these commands in your preferred terminal in a good directory for development: Now, run these commands in your preferred terminal in a good directory for development:
``` ```
git lfs install # Setup Git LFS.
npm install --global yarn # Make sure you have have `yarn`
git clone https://github.com/signalapp/Signal-Desktop.git git clone https://github.com/signalapp/Signal-Desktop.git
cd Signal-Desktop cd Signal-Desktop
git-lfs install # Setup Git LFS.
npm install --global yarn # (only if you dont already have `yarn`)
yarn install --frozen-lockfile # Install and build dependencies (this will take a while) yarn install --frozen-lockfile # Install and build dependencies (this will take a while)
yarn generate # Generate final JS and CSS assets yarn generate # Generate final JS and CSS assets
yarn build:webpack # Build parts of the app that use webpack (Sticker Creator) yarn build:webpack # Build parts of the app that use webpack (Sticker Creator)
@ -181,9 +181,17 @@ Please write tests! Our testing framework is
[mocha](http://mochajs.org/) and our assertion library is [mocha](http://mochajs.org/) and our assertion library is
[chai](http://chaijs.com/api/assert/). [chai](http://chaijs.com/api/assert/).
The easiest way to run all tests at once is `yarn test`, which will run them on the The easiest way to run all tests at once is `yarn test`.
command line. You can run the client-side tests in an interactive session with
`NODE_ENV=test yarn run start`. You can browse tests from the command line with `grunt unit-tests` or in an
interactive session with `NODE_ENV=test yarn run start`.
If you want to run the `libtextsecure` tests, you can run `yarn run test-electron`,
which also runs the unit tests.
To run Node.js tests, you can run `yarn test-server` from the command line. You can get
code coverage numbers for this kind of run via `yarn test-server-coverage`, then display
the report with `yarn open-coverage`.
## Pull requests ## Pull requests
@ -191,16 +199,19 @@ So you wanna make a pull request? Please observe the following guidelines.
- First, make sure that your `yarn ready` run passes - it's very similar to what our - First, make sure that your `yarn ready` run passes - it's very similar to what our
Continuous Integration servers do to test the app. Continuous Integration servers do to test the app.
- Please do not submit pull requests for translation fixes. - Please do not submit pull requests for translation fixes. Anyone can update
the translations in
[Transifex](https://www.transifex.com/projects/p/signal-desktop).
- Never use plain strings right in the source code - pull them from `messages.json`! - Never use plain strings right in the source code - pull them from `messages.json`!
You **only** need to modify the default locale You **only** need to modify the default locale
[`_locales/en/messages.json`](_locales/en/messages.json). Other locales are generated [`_locales/en/messages.json`](_locales/en/messages.json). Other locales are generated
automatically based on that file and then periodically translated. automatically based on that file and then periodically uploaded to Transifex for
translation.
- [Rebase](https://nathanleclaire.com/blog/2014/09/14/dont-be-scared-of-git-rebase/) your - [Rebase](https://nathanleclaire.com/blog/2014/09/14/dont-be-scared-of-git-rebase/) your
changes on the latest `main` branch, resolving any conflicts. changes on the latest `development` branch, resolving any conflicts.
This ensures that your changes will merge cleanly when you open your PR. This ensures that your changes will merge cleanly when you open your PR.
- Be sure to add and run tests! - Be sure to add and run tests!
- Make sure the diff between the development branch and your branch contains only the - Make sure the diff between our master and your branch contains only the
minimal set of changes needed to implement your feature or bugfix. This will minimal set of changes needed to implement your feature or bugfix. This will
make it easier for the person reviewing your code to approve the changes. make it easier for the person reviewing your code to approve the changes.
Please do not submit a PR with commented out code or unfinished features. Please do not submit a PR with commented out code or unfinished features.
@ -272,3 +283,15 @@ yarn build
``` ```
Then, run the tests using `yarn test-release`. Then, run the tests using `yarn test-release`.
## Translations
To pull the latest translations, follow these steps:
1. Download Transifex client:
https://docs.transifex.com/client/installing-the-client
2. Create Transifex account: https://transifex.com
3. Generate API token: https://www.transifex.com/user/settings/api/
4. Create `~/.transifexrc` configuration:
https://docs.transifex.com/client/client-configuration#-transifexrc
5. Run `yarn grunt tx`.

View File

@ -20,9 +20,15 @@ Please search for any [existing issues](https://github.com/signalapp/Signal-Desk
Please use our community forum: https://community.signalusers.org/ Please use our community forum: https://community.signalusers.org/
## Contributing Translations
Interested in helping to translate Signal? Contribute here:
https://www.transifex.com/projects/p/signal-desktop
## Contributing Code ## Contributing Code
Please see [CONTRIBUTING.md](https://github.com/signalapp/Signal-Desktop/blob/main/CONTRIBUTING.md) Please see [CONTRIBUTING.md](https://github.com/signalapp/Signal-Desktop/blob/development/CONTRIBUTING.md)
for setup instructions and guidelines for new contributors. Don't forget to sign the [CLA](https://signal.org/cla/). for setup instructions and guidelines for new contributors. Don't forget to sign the [CLA](https://signal.org/cla/).
## Contributing Funds ## Contributing Funds

File diff suppressed because it is too large Load Diff

6852
_locales/af/messages.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

6852
_locales/az/messages.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

6852
_locales/bg/messages.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

6852
_locales/bn/messages.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

6852
_locales/cy/messages.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

6852
_locales/eo/messages.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

6852
_locales/et/messages.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

6852
_locales/fa/messages.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

6852
_locales/gu/messages.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

6852
_locales/hi/messages.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

6852
_locales/hr/messages.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

6852
_locales/is/messages.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

6852
_locales/km/messages.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

6852
_locales/kn/messages.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

6852
_locales/ku/messages.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

6852
_locales/lo/messages.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

6852
_locales/lt/messages.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

6852
_locales/lv/messages.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

6852
_locales/mk/messages.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

6852
_locales/ml/messages.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

6852
_locales/mr/messages.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

6852
_locales/nn/messages.json Normal file

File diff suppressed because it is too large Load Diff

6852
_locales/no/messages.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

6852
_locales/pa/messages.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

6852
_locales/ps/messages.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

6852
_locales/pt_BR/messages.json Normal file

File diff suppressed because it is too large Load Diff

6852
_locales/pt_PT/messages.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More