From 7c0ea6cfa738c1bef39c91836523d79d433f907e Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 4 Jun 2020 21:42:08 -0400 Subject: [PATCH 1/8] Version v0.6.70 --- ansible/VERSION | 2 +- docker/prod/docker-compose.yml | 2 +- server/src/version.rs | 2 +- ui/src/version.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ansible/VERSION b/ansible/VERSION index 7696aef24..beea23af0 100644 --- a/ansible/VERSION +++ b/ansible/VERSION @@ -1 +1 @@ -v0.6.69 +v0.6.70 diff --git a/docker/prod/docker-compose.yml b/docker/prod/docker-compose.yml index fb8295298..615423a54 100644 --- a/docker/prod/docker-compose.yml +++ b/docker/prod/docker-compose.yml @@ -12,7 +12,7 @@ services: restart: always lemmy: - image: dessalines/lemmy:v0.6.69 + image: dessalines/lemmy:v0.6.70 ports: - "127.0.0.1:8536:8536" restart: always diff --git a/server/src/version.rs b/server/src/version.rs index 9c7b4a0b1..c85c35f28 100644 --- a/server/src/version.rs +++ b/server/src/version.rs @@ -1 +1 @@ -pub const VERSION: &str = "v0.6.69"; +pub const VERSION: &str = "v0.6.70"; diff --git a/ui/src/version.ts b/ui/src/version.ts index 4448d741b..47f1507f3 100644 --- a/ui/src/version.ts +++ b/ui/src/version.ts @@ -1 +1 @@ -export const version: string = 'v0.6.69'; +export const version: string = 'v0.6.70'; From 8257b040be3b43a4419611ee712f2e3237d63a72 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Fri, 5 Jun 2020 17:07:38 +0200 Subject: [PATCH 2/8] Limit memory usage for pictshare and iframely --- docker/prod/docker-compose.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker/prod/docker-compose.yml b/docker/prod/docker-compose.yml index 615423a54..f66a59861 100644 --- a/docker/prod/docker-compose.yml +++ b/docker/prod/docker-compose.yml @@ -1,4 +1,4 @@ -version: '3.3' +version: '2.2' services: postgres: @@ -32,6 +32,7 @@ services: volumes: - ./volumes/pictshare:/usr/share/nginx/html/data restart: always + mem_limit: 100m iframely: image: dogbin/iframely:latest @@ -40,3 +41,4 @@ services: volumes: - ./iframely.config.local.js:/iframely/config.local.js:ro restart: always + mem_limit: 100m From 9bf444e93a32e6db3ca0db829b67c6764f18b406 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Fri, 5 Jun 2020 11:45:04 -0400 Subject: [PATCH 3/8] Removing webp for now. --- ui/src/utils.ts | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/ui/src/utils.ts b/ui/src/utils.ts index cb56ba581..961584627 100644 --- a/ui/src/utils.ts +++ b/ui/src/utils.ts @@ -863,16 +863,19 @@ export function previewLines(text: string, lines: number = 3): string { } function canUseWebP() { - var elem = document.createElement('canvas'); - - if (!!(elem.getContext && elem.getContext('2d'))) { - var testString = !(window.mozInnerScreenX == null) ? 'png' : 'webp'; - // was able or not to get WebP representation - return ( - elem.toDataURL('image/webp').startsWith('data:image/' + testString) - ); - } - - // very old browser like IE 8, canvas not supported + // TODO pictshare might have a webp conversion bug, try disabling this return false; + + // var elem = document.createElement('canvas'); + + // if (!!(elem.getContext && elem.getContext('2d'))) { + // var testString = !(window.mozInnerScreenX == null) ? 'png' : 'webp'; + // // was able or not to get WebP representation + // return ( + // elem.toDataURL('image/webp').startsWith('data:image/' + testString) + // ); + // } + + // // very old browser like IE 8, canvas not supported + // return false; } From 63ca6e1e24c783aea9b55b2a701f3818a5e329f4 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Fri, 5 Jun 2020 11:49:36 -0400 Subject: [PATCH 4/8] Version v0.6.71 --- ansible/VERSION | 2 +- docker/prod/docker-compose.yml | 2 +- server/src/version.rs | 2 +- ui/src/version.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ansible/VERSION b/ansible/VERSION index beea23af0..e31dcbc42 100644 --- a/ansible/VERSION +++ b/ansible/VERSION @@ -1 +1 @@ -v0.6.70 +v0.6.71 diff --git a/docker/prod/docker-compose.yml b/docker/prod/docker-compose.yml index 615423a54..bb4975e7f 100644 --- a/docker/prod/docker-compose.yml +++ b/docker/prod/docker-compose.yml @@ -12,7 +12,7 @@ services: restart: always lemmy: - image: dessalines/lemmy:v0.6.70 + image: dessalines/lemmy:v0.6.71 ports: - "127.0.0.1:8536:8536" restart: always diff --git a/server/src/version.rs b/server/src/version.rs index c85c35f28..354b86b40 100644 --- a/server/src/version.rs +++ b/server/src/version.rs @@ -1 +1 @@ -pub const VERSION: &str = "v0.6.70"; +pub const VERSION: &str = "v0.6.71"; diff --git a/ui/src/version.ts b/ui/src/version.ts index 47f1507f3..9abc8bceb 100644 --- a/ui/src/version.ts +++ b/ui/src/version.ts @@ -1 +1 @@ -export const version: string = 'v0.6.70'; +export const version: string = 'v0.6.71'; From a3a55dd1958f0e7df6add468ac3c8fd08fcd6aaa Mon Sep 17 00:00:00 2001 From: Lorenz Schmidt Date: Fri, 5 Jun 2020 18:03:01 +0200 Subject: [PATCH 5/8] Indicate unstable API in README and mdbook (#781) --- README.md | 2 +- docs/src/contributing_websocket_http_api.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9c4f6bfa9..09b2540f0 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ The overall goal is to create an easily self-hostable, decentralized alternative Each lemmy server can set its own moderation policy; appointing site-wide admins, and community moderators to keep out the trolls, and foster a healthy, non-toxic environment where all can feel comfortable contributing. -*Note: Federation is still in active development* +*Note: Federation is still in active development and the WebSocket, as well as, HTTP API are currently unstable* ### Why's it called Lemmy? diff --git a/docs/src/contributing_websocket_http_api.md b/docs/src/contributing_websocket_http_api.md index f228f94e0..567f674cd 100644 --- a/docs/src/contributing_websocket_http_api.md +++ b/docs/src/contributing_websocket_http_api.md @@ -1,6 +1,6 @@ # Lemmy API -*Note: this may lag behind the actual API endpoints [here](../server/src/api).* +*Note: this may lag behind the actual API endpoints [here](../server/src/api). The API should be considered unstable and may change any time.* From c7b861e0baa53863a69c9d836cba0a65ebada00a Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sat, 6 Jun 2020 21:22:39 -0400 Subject: [PATCH 6/8] Updating sponsor list. --- 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 cf2bee821..35ec76358 100644 --- a/ui/src/components/sponsors.tsx +++ b/ui/src/components/sponsors.tsx @@ -10,10 +10,9 @@ interface SilverUser { } let general = [ + 'Ernest Wiśniewski', + 'HN', 'Forrest Weghorst', - 'Serge Tarkovski', - 'alexx henry', - 'Nathan J. Goode', 'Andre Vallestero', 'NotTooHighToHack', ]; From c1421c9c4437064fd2204df8474d8fa40e4a7ba8 Mon Sep 17 00:00:00 2001 From: ernestwisniewski Date: Sun, 7 Jun 2020 13:34:15 +0200 Subject: [PATCH 7/8] Adding Polish language (#784) --- ui/src/i18next.ts | 2 ++ ui/src/utils.ts | 4 ++++ ui/translations/pl.json | 12 +++++++----- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ui/src/i18next.ts b/ui/src/i18next.ts index f2b8c10e4..cba9e3c2d 100644 --- a/ui/src/i18next.ts +++ b/ui/src/i18next.ts @@ -16,6 +16,7 @@ import { fi } from './translations/fi'; import { ca } from './translations/ca'; import { fa } from './translations/fa'; import { hi } from './translations/hi'; +import { pl } from './translations/pl'; import { pt_BR } from './translations/pt_BR'; import { ja } from './translations/ja'; import { ka } from './translations/ka'; @@ -39,6 +40,7 @@ const resources = { fi, ca, fa, + pl, pt_BR, ja, }; diff --git a/ui/src/utils.ts b/ui/src/utils.ts index 961584627..66a21319d 100644 --- a/ui/src/utils.ts +++ b/ui/src/utils.ts @@ -12,6 +12,7 @@ import 'moment/locale/it'; import 'moment/locale/fi'; import 'moment/locale/ca'; import 'moment/locale/fa'; +import 'moment/locale/pl'; import 'moment/locale/pt-br'; import 'moment/locale/ja'; import 'moment/locale/ka'; @@ -70,6 +71,7 @@ export const languages = [ { code: 'hi', name: 'मानक हिन्दी' }, { code: 'fa', name: 'فارسی' }, { code: 'ja', name: '日本語' }, + { code: 'pl', name: 'Polski' }, { code: 'pt_BR', name: 'Português Brasileiro' }, { code: 'zh', name: '中文' }, { code: 'fi', name: 'Suomi' }, @@ -366,6 +368,8 @@ export function getMomentLanguage(): string { lang = 'ca'; } else if (lang.startsWith('fa')) { lang = 'fa'; + } else if (lang.startsWith('pl')) { + lang = 'pl'; } else if (lang.startsWith('pt')) { lang = 'pt-br'; } else if (lang.startsWith('ja')) { diff --git a/ui/translations/pl.json b/ui/translations/pl.json index d9bb8b276..ad2e9c1c4 100644 --- a/ui/translations/pl.json +++ b/ui/translations/pl.json @@ -65,14 +65,14 @@ "remove_as_admin": "wycofaj uprawnienia administratora", "appoint_as_admin": "przyznaj uprawnienia administratora", "remove": "usuń", - "removed": "usunięte", + "removed": "usunięte przez moderatora", "locked": "zablokowane", "stickied": "przyklejone", "reason": "Powód", "mark_as_read": "zaznacz jako przeczytane", "mark_as_unread": "zaznacz jako nieprzeczytane", "delete": "usuń", - "deleted": "usunięte", + "deleted": "usunięte przez autora", "delete_account": "Usuń Konto", "delete_account_confirm": "Ostrzeżenie: twoje dane zostaną bezpowrotnie usunięte. Wpisz swoje hasło aby potwierdzić.", "restore": "przywróć", @@ -189,7 +189,7 @@ "theme": "Motyw", "sponsors": "Sponsorzy", "sponsors_of_lemmy": "Sponsorzy projektu Lemmy", - "sponsor_message": "Lemmy jest wolnym, <1>otwartoźródłowym oprogramowaniem, co oznacza zero reklam, opłat, czy innych form kapitalizacji, od zawsze na zawsze. Twoje darowizny idą bezpośrednio na rozwój projektu w pełno-etatowym wymiarze. Specjalne wyrazy podziękowania dla następujących osób:", + "sponsor_message": "Lemmy jest wolnym, <1>otwartoźródłowym oprogramowaniem, bez reklam, opłat, czy innych form kapitalizacji, od zawsze na zawsze. Twoje darowizny idą bezpośrednio na rozwój projektu w pełno-etatowym wymiarze. Specjalne wyrazy podziękowania dla następujących osób:", "support_on_patreon": "Wspieraj w serwisie Patreon", "support_on_liberapay": "Wspieraj na Liberapay", "donate_to_lemmy": "Przekaż datek na Lemmiego", @@ -209,7 +209,7 @@ "are_you_sure": "na pewno?", "no": "nie", "powered_by": "Powered by", - "landing": "Lemmy jest <1>agregatorem linków / alternatywą dla reddita. Jest przeznaczony do działania w ramach cyfrowej przestrzeni nazywanej <2>fediverse<2>. <3>Opiera się na samodzielnym hostingu, posiada aktualizowane na żywo wątki z komentarzami, i zajmuje bardzo mało miejsce (<4>~80kB). Federacja w ramach sieci ActivityPub jest w planach. <5>Ta wersja jest <6>bardzo wczesną wersją beta, co oznacza, że wiele funkcji nadal nie działa tak jak powinny. <7><8>Pod tym adresem można sugerować nową funkcjonalność i zgłaszać błędy.<9>Stworzono z wykorzystaniem <10>Rust, <11>Actix, <12>Inferno, <13>Typescript.", + "landing_0": "Lemmy jest <1>agregatorem linków / alternatywą dla reddita. Jest przeznaczony do działania w ramach cyfrowej przestrzeni nazywanej <2>fediverse. <3>Opiera się na samodzielnym hostingu, posiada aktualizowane na żywo wątki z komentarzami, i zajmuje bardzo mało miejsce (<4>~80kB). Federacja w ramach sieci ActivityPub jest w planach. <5>Ta wersja jest <6>bardzo wczesną wersją beta, co oznacza, że wiele funkcji nadal nie działa tak jak powinny. <7><8>Pod tym adresem można sugerować nową funkcjonalność i zgłaszać błędy.<9>Stworzono z wykorzystaniem <10>Rust, <11>Actix, <12>Inferno, <13>Typescript.", "not_logged_in": "Nie jesteś zalogowana/y.", "logged_in": "Zalogowano.", "community_ban": "Zostałaś/eś zbanowana/y z tej społeczności.", @@ -260,5 +260,7 @@ "site_saved": "Witryna Zapisana.", "admin_settings": "Ustawienia Administratora", "emoji_picker": "Wybór Emoji", - "silver_sponsors": "Srebrni Sponsorzy to ci, którzy wpłacili co najmniej $40 na Lemmiego." + "silver_sponsors": "Srebrni Sponsorzy to ci, którzy wpłacili co najmniej $40 na Lemmiego.", + "select_a_community": "Wybierz społeczność", + "invalid_username": "Nieprawidłowa nazwa użytkownika." } From a13e9fe3959e07f901ba0647dfd7f749865a900d Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sun, 7 Jun 2020 07:51:36 -0400 Subject: [PATCH 8/8] Adding galician, turkish, hungarian, and ukrainian languages. --- ui/src/i18next.ts | 8 ++++++++ ui/src/utils.ts | 16 ++++++++++++++++ ui/translations/gl.json | 1 + ui/translations/hu.json | 1 + ui/translations/tr.json | 1 + ui/translations/uk.json | 1 + 6 files changed, 28 insertions(+) create mode 100644 ui/translations/gl.json create mode 100644 ui/translations/hu.json create mode 100644 ui/translations/tr.json create mode 100644 ui/translations/uk.json diff --git a/ui/src/i18next.ts b/ui/src/i18next.ts index cba9e3c2d..5fa8f4e88 100644 --- a/ui/src/i18next.ts +++ b/ui/src/i18next.ts @@ -20,6 +20,10 @@ import { pl } from './translations/pl'; import { pt_BR } from './translations/pt_BR'; import { ja } from './translations/ja'; import { ka } from './translations/ka'; +import { gl } from './translations/gl'; +import { tr } from './translations/tr'; +import { hu } from './translations/hu'; +import { uk } from './translations/uk'; // https://github.com/nimbusec-oss/inferno-i18next/blob/master/tests/T.test.js#L66 const resources = { @@ -43,6 +47,10 @@ const resources = { pl, pt_BR, ja, + gl, + tr, + hu, + uk, }; function format(value: any, format: any, lng: any): any { diff --git a/ui/src/utils.ts b/ui/src/utils.ts index 66a21319d..3bad50404 100644 --- a/ui/src/utils.ts +++ b/ui/src/utils.ts @@ -17,6 +17,10 @@ import 'moment/locale/pt-br'; import 'moment/locale/ja'; import 'moment/locale/ka'; import 'moment/locale/hi'; +import 'moment/locale/gl'; +import 'moment/locale/tr'; +import 'moment/locale/hu'; +import 'moment/locale/uk'; import { UserOperation, @@ -67,6 +71,8 @@ export const languages = [ { code: 'eo', name: 'Esperanto' }, { code: 'es', name: 'Español' }, { code: 'de', name: 'Deutsch' }, + { code: 'gl', name: 'Galego' }, + { code: 'hu', name: 'Magyar Nyelv' }, { code: 'ka', name: 'ქართული ენა' }, { code: 'hi', name: 'मानक हिन्दी' }, { code: 'fa', name: 'فارسی' }, @@ -77,6 +83,8 @@ export const languages = [ { code: 'fi', name: 'Suomi' }, { code: 'fr', name: 'Français' }, { code: 'sv', name: 'Svenska' }, + { code: 'tr', name: 'Türkçe' }, + { code: 'uk', name: 'українська мова' }, { code: 'ru', name: 'Русский' }, { code: 'nl', name: 'Nederlands' }, { code: 'it', name: 'Italiano' }, @@ -382,6 +390,14 @@ export function getMomentLanguage(): string { lang = 'el'; } else if (lang.startsWith('eu')) { lang = 'eu'; + } else if (lang.startsWith('gl')) { + lang = 'gl'; + } else if (lang.startsWith('tr')) { + lang = 'tr'; + } else if (lang.startsWith('hu')) { + lang = 'hu'; + } else if (lang.startsWith('uk')) { + lang = 'uk'; } else { lang = 'en'; } diff --git a/ui/translations/gl.json b/ui/translations/gl.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/ui/translations/gl.json @@ -0,0 +1 @@ +{} diff --git a/ui/translations/hu.json b/ui/translations/hu.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/ui/translations/hu.json @@ -0,0 +1 @@ +{} diff --git a/ui/translations/tr.json b/ui/translations/tr.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/ui/translations/tr.json @@ -0,0 +1 @@ +{} diff --git a/ui/translations/uk.json b/ui/translations/uk.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/ui/translations/uk.json @@ -0,0 +1 @@ +{}