From 807399ead7b8509d28bd9af24caee0899cc1db91 Mon Sep 17 00:00:00 2001 From: Kirill Date: Fri, 18 Oct 2019 19:03:23 +0000 Subject: [PATCH 01/22] =?UTF-8?q?Update=20README.md.=20Corrected=20Mot?= =?UTF-8?q?=C3=B6rhead=20spelling.=20(#307)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is impörtant! --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4c4020ef..e7af4c5d 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ Each lemmy server can set its own moderation policy; appointing site-wide admins ## Why's it called Lemmy? -- Lead singer from [motorhead](https://invidio.us/watch?v=pWB5JZRGl0U). +- Lead singer from [Motörhead](https://invidio.us/watch?v=pWB5JZRGl0U). - The old school [video game](). - The [Koopa from Super Mario](https://www.mariowiki.com/Lemmy_Koopa). - The [furry rodents](http://sunchild.fpwc.org/lemming-the-little-giant-of-the-north/). From 1189e3f4ada6775d3bad91b89fa5b4cbfdb3a168 Mon Sep 17 00:00:00 2001 From: Quentin Date: Fri, 18 Oct 2019 21:10:07 +0200 Subject: [PATCH 02/22] ui: Add missing french translations (#308) --- README.md | 2 +- ui/src/translations/fr.ts | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e7af4c5d..62a217d3 100644 --- a/README.md +++ b/README.md @@ -204,7 +204,7 @@ lang | done | missing de | 82% | cross_posts,cross_post,users,number_of_communities,preview,upload_image,formatting_help,view_source,sticky,unsticky,settings,stickied,delete_account,delete_account_confirm,banned,creator,number_online,subscribed,expires,recent_comments,nsfw,show_nsfw,theme,crypto,monero,joined,by,to,transfer_community,transfer_site,are_you_sure,yes,no eo | 91% | number_of_communities,preview,upload_image,formatting_help,view_source,sticky,unsticky,stickied,delete_account,delete_account_confirm,banned,creator,number_online,theme,are_you_sure,yes,no es | 100% | -fr | 95% | view_source,sticky,unsticky,stickied,delete_account,delete_account_confirm,creator,number_online,theme +fr | 100% | nl | 93% | preview,upload_image,formatting_help,view_source,sticky,unsticky,stickied,delete_account,delete_account_confirm,banned,creator,number_online,theme ru | 86% | cross_posts,cross_post,number_of_communities,preview,upload_image,formatting_help,view_source,sticky,unsticky,stickied,delete_account,delete_account_confirm,banned,creator,number_online,recent_comments,theme,monero,by,to,transfer_community,transfer_site,are_you_sure,yes,no sv | 100% | diff --git a/ui/src/translations/fr.ts b/ui/src/translations/fr.ts index 3786b10c..7e86bf93 100644 --- a/ui/src/translations/fr.ts +++ b/ui/src/translations/fr.ts @@ -29,8 +29,11 @@ export const fr = { preview: 'prévisualiser', upload_image: 'téléverser une image', formatting_help: 'aide de formattage', + view_source: 'voir les sources', unlock: 'débloquer', lock: 'bloquer', + sticky: 'épingler', + unsticky: 'désépingler', link: 'lien', mod: 'modérateur', mods: 'modérateurs', @@ -46,11 +49,14 @@ export const fr = { remove: 'retirer', removed: 'retiré', locked: 'bloqué', + stickied: 'épinglé', reason: 'Raison', mark_as_read: 'marquer comme lu', mark_as_unread: 'marquer comme non-lu', delete: 'supprimer', deleted: 'supprimé', + delete_account: 'Supprimer le compte', + delete_account_confirm: 'Attention: cette action supprime toutes vos données de façons permanente. Entrez votre mot de passe pour confirmer.', restore: 'restaurer', ban: 'bannir', ban_from_site: 'bannir du site', @@ -60,11 +66,13 @@ export const fr = { save: 'sauvegarder', unsave: 'retirer', create: 'créer', + creator: 'createur', username: 'Nom d\'utilisateur', email_or_username: 'Email ou Nom d\'utilisateur', number_of_users:'{{count}} Utilisateurs', number_of_subscribers:'{{count}} Abonnés', number_of_points:'{{count}} Points', + number_online: '{{count}} Utilisateurs en ligne', name: 'Nom', title: 'Titre', category: 'Catégorie', @@ -123,6 +131,7 @@ export const fr = { modified: 'modifié', nsfw: 'Pas sûr pour le travail', show_nsfw: 'Afficher le contenu NSFW', + theme: 'Thème', sponsors: 'Sponsors', sponsors_of_lemmy: 'Sponsors de Lemmy', sponsor_message: 'Lemmy est gratuit et <1>open-source, c\'est à dire sans publicité et sans monétisation. Pour toujours. Vos dons soutiennent directement le développement du projet. Merci à nos soutiens.', From f3e93aeacceca7c35938b3672ab65a90aaf2e5d0 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Fri, 18 Oct 2019 12:13:09 -0700 Subject: [PATCH 03/22] Translation report instructions. --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 62a217d3..80c4993c 100644 --- a/README.md +++ b/README.md @@ -210,6 +210,13 @@ ru | 86% | cross_posts,cross_post,number_of_communities,preview,upload_image,for sv | 100% | zh | 84% | cross_posts,cross_post,users,number_of_communities,preview,upload_image,formatting_help,view_source,sticky,unsticky,settings,stickied,delete_account,delete_account_confirm,banned,creator,number_online,recent_comments,nsfw,show_nsfw,theme,monero,by,to,transfer_community,transfer_site,are_you_sure,yes,no +If you'd like to update this report, run: + +```bash +cd ui +ts-node translation_report.ts > tmp # And replace the text above. +``` + ## Credits Logo made by Andy Cuccaro (@andycuccaro) under the CC-BY-SA 4.0 license From f140cfa847cbb648ae7551fa1d2fb6a489f60165 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Fri, 18 Oct 2019 12:14:28 -0700 Subject: [PATCH 04/22] Version v0.3.0.3 --- docker/prod/docker-compose.yml | 2 +- ui/src/version.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/prod/docker-compose.yml b/docker/prod/docker-compose.yml index 5c431ecc..aa6f4e40 100644 --- a/docker/prod/docker-compose.yml +++ b/docker/prod/docker-compose.yml @@ -10,7 +10,7 @@ services: volumes: - lemmy_db:/var/lib/postgresql/data lemmy: - image: dessalines/lemmy:v0.3.0.2 + image: dessalines/lemmy:v0.3.0.3 ports: - "127.0.0.1:8536:8536" environment: diff --git a/ui/src/version.ts b/ui/src/version.ts index 87b96ac4..5f8ad2c6 100644 --- a/ui/src/version.ts +++ b/ui/src/version.ts @@ -1 +1 @@ -export let version: string = "v0.3.0.2-0-g9f5a328"; \ No newline at end of file +export let version: string = "v0.3.0.3-0-gf3e93ae"; \ No newline at end of file From 27ea8af9928c3789ee7425d2d3ed44987bf6831b Mon Sep 17 00:00:00 2001 From: Dessalines Date: Fri, 18 Oct 2019 13:58:43 -0700 Subject: [PATCH 05/22] Adding sponsors. --- ui/src/components/sponsors.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ui/src/components/sponsors.tsx b/ui/src/components/sponsors.tsx index 8f58812d..5d0b1b17 100644 --- a/ui/src/components/sponsors.tsx +++ b/ui/src/components/sponsors.tsx @@ -3,9 +3,8 @@ import { WebSocketService } from '../services'; import { i18n } from '../i18next'; import { T } from 'inferno-i18next'; -let general = - [ - "Nathan J. Goode", +let general = [ + "riccardo","NotTooHighToHack", ]; // let highlighted = []; // let silver = []; From 12624813b483071e2343af9d7629b66b2f8d25cf Mon Sep 17 00:00:00 2001 From: zacanger Date: Fri, 18 Oct 2019 15:56:32 -0600 Subject: [PATCH 06/22] chore: switch from tslint to eslint --- ui/.eslintrc.json | 57 ++ ui/package.json | 6 +- ui/src/components/symbols.tsx | 2 +- ui/tslint.json | 28 - ui/yarn.lock | 1296 ++++++++++++++++++++++++++++++++- 5 files changed, 1342 insertions(+), 47 deletions(-) create mode 100644 ui/.eslintrc.json delete mode 100644 ui/tslint.json diff --git a/ui/.eslintrc.json b/ui/.eslintrc.json new file mode 100644 index 00000000..bee9e538 --- /dev/null +++ b/ui/.eslintrc.json @@ -0,0 +1,57 @@ +{ + "root": true, + "env": { + "browser": true + }, + "plugins": [ + "jane", + "inferno" + ], + "extends": [ + "plugin:jane/recommended", + "plugin:jane/typescript", + "plugin:inferno/recommended" + ], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "project": "./tsconfig.json", + "warnOnUnsupportedTypeScriptVersion": false + }, + "rules": { + "@typescript-eslint/camelcase": 0, + "@typescript-eslint/member-delimiter-style": 0, + "@typescript-eslint/no-empty-interface": 0, + "@typescript-eslint/no-explicit-any": 0, + "@typescript-eslint/no-this-alias": 0, + "@typescript-eslint/no-unused-vars": 0, + "@typescript-eslint/no-use-before-define": 0, + "@typescript-eslint/no-useless-constructor": 0, + "arrow-body-style": 0, + "curly": 0, + "eol-last": 0, + "eqeqeq": 0, + "func-style": 0, + "import/no-duplicates": 0, + "inferno/jsx-key": 0, + "inferno/jsx-no-target-blank": 0, + "inferno/jsx-props-class-name": 0, + "inferno/no-direct-mutation-state": 0, + "inferno/no-unknown-property": 0, + "max-statements": 0, + "new-cap": 0, + "no-console": 0, + "no-duplicate-imports": 0, + "no-extra-parens": 0, + "no-return-assign": 0, + "no-throw-literal": 0, + "no-trailing-spaces": 0, + "no-unused-expressions": 0, + "no-useless-constructor": 0, + "no-useless-escape": 0, + "no-var": 0, + "prefer-const": 0, + "prefer-rest-params": 0, + "quote-props": 0, + "unicorn/filename-case": 0 + } +} diff --git a/ui/package.json b/ui/package.json index 3537a2ac..603faf0b 100644 --- a/ui/package.json +++ b/ui/package.json @@ -5,7 +5,8 @@ "main": "index.js", "scripts": { "start": "node fuse dev", - "build": "node fuse prod" + "build": "node fuse prod", + "lint": "eslint --report-unused-disable-directives --ext .js,.ts,.tsx src" }, "keywords": [], "author": "Dessalines", @@ -43,6 +44,9 @@ }, "devDependencies": { "@types/i18next": "^12.1.0", + "eslint": "^6.5.1", + "eslint-plugin-inferno": "^7.14.3", + "eslint-plugin-jane": "^7.0.0", "fuse-box": "^3.1.3", "ts-transform-classcat": "^0.0.2", "ts-transform-inferno": "^4.0.2", diff --git a/ui/src/components/symbols.tsx b/ui/src/components/symbols.tsx index e2803fb7..a299ff25 100644 --- a/ui/src/components/symbols.tsx +++ b/ui/src/components/symbols.tsx @@ -8,7 +8,7 @@ export class Symbols extends Component { render() { return ( -
-