Merge pull request #1 from dessalines/master

Merge upstream
This commit is contained in:
Richie Zhang 2020-02-05 17:11:18 -08:00 committed by GitHub
commit d6b4ab8abb
22 changed files with 310 additions and 31 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
ansible/inventory
ansible/inventory_dev
ansible/passwords/
docker/lemmy_mine.hjson
docker/dev/env_deploy.sh

29
README.md vendored
View File

@ -147,9 +147,9 @@ ansible-playbook lemmy.yml --become
Lemmy is free, open-source software, meaning no advertising, monetizing, or venture capital, ever. Your donations directly support full-time development of the project.
- [Support on Liberapay.](https://liberapay.com/Lemmy)
- [Support on Patreon](https://www.patreon.com/dessalines).
- [List of Sponsors](https://dev.lemmy.ml/sponsors).
- Soon to add either liberapay or opencollective.
### Crypto
@ -161,24 +161,25 @@ Lemmy is free, open-source software, meaning no advertising, monetizing, or vent
If you'd like to add translations, take a look at the [English translation file](ui/src/translations/en.ts).
- Languages supported: Catalan, (`ca`), Farsi (`fa`), English (`en`), Chinese (`zh`), Dutch (`nl`), Esperanto (`eo`), Finnish (`fi`), French (`fr`), Spanish (`es`), Swedish (`sv`), German (`de`), Russian (`ru`), Italian (`it`).
- Languages supported: Brazilian Portuguese (`pt-br`), Catalan, (`ca`), Farsi (`fa`), English (`en`), Chinese (`zh`), Dutch (`nl`), Esperanto (`eo`), Finnish (`fi`), French (`fr`), Spanish (`es`), Swedish (`sv`), German (`de`), Russian (`ru`), Italian (`it`).
<!-- translations -->
lang | done | missing
---- | ---- | -------
ca | 99% | old,time,action
de | 87% | create_private_message,send_secure_message,send_message,message,avatar,upload_avatar,show_avatars,old,docs,message_sent,messages,old_password,matrix_user_id,private_message_disclaimer,send_notifications_to_email,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,donate_to_lemmy,donate,from,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message,time,action
fa | 72% | cross_post,subscribed_to_communities,trending_communities,create_private_message,send_secure_message,send_message,message,mod,mods,moderates,remove_as_mod,appoint_as_mod,modlog,stickied,ban,ban_from_site,unban,unban_from_site,banned,number_of_subscribers,subscribers,both,saved,unsubscribe,subscribe,subscribed,old,api,docs,inbox,inbox_for,message_sent,notifications_error,messages,no_email_setup,matrix_user_id,private_message_disclaimer,url,body,copy_suggested_title,community,expand_here,subscribe_to_communities,theme,sponsor_message,general_sponsors,joined,by,to,from,landing_0,logged_in,community_moderator_already_exists,community_follower_already_exists,community_user_already_banned,no_slurs,admin_already_created,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message,time,action
eo | 75% | number_of_communities,create_private_message,send_secure_message,send_message,message,preview,upload_image,avatar,upload_avatar,show_avatars,formatting_help,view_source,sticky,unsticky,archive_link,stickied,delete_account,delete_account_confirm,banned,creator,number_online,old,docs,replies,mentions,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,theme,donate_to_lemmy,donate,from,are_you_sure,yes,no,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message,time,action
es | 100% |
fi | 99% | old,time,action
fr | 82% | create_private_message,send_secure_message,send_message,message,avatar,upload_avatar,show_avatars,archive_link,old,docs,replies,mentions,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,donate_to_lemmy,donate,from,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message,time,action
it | 83% | create_private_message,send_secure_message,send_message,message,avatar,upload_avatar,show_avatars,archive_link,old,docs,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,donate_to_lemmy,donate,from,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message,time,action
nl | 99% | time,action
ru | 71% | cross_posts,cross_post,number_of_communities,create_private_message,send_secure_message,send_message,message,preview,upload_image,avatar,upload_avatar,show_avatars,formatting_help,view_source,sticky,unsticky,archive_link,stickied,delete_account,delete_account_confirm,banned,creator,number_online,old,docs,replies,mentions,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,recent_comments,theme,donate_to_lemmy,donate,monero,by,to,from,transfer_community,transfer_site,are_you_sure,yes,no,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message,time,action
sv | 82% | create_private_message,send_secure_message,send_message,message,avatar,upload_avatar,show_avatars,archive_link,old,docs,replies,mentions,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,donate_to_lemmy,donate,from,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message,time,action
zh | 69% | cross_posts,cross_post,users,number_of_communities,create_private_message,send_secure_message,send_message,message,preview,upload_image,avatar,upload_avatar,show_avatars,formatting_help,view_source,sticky,unsticky,archive_link,settings,stickied,delete_account,delete_account_confirm,banned,creator,number_online,old,docs,replies,mentions,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,recent_comments,nsfw,show_nsfw,theme,donate_to_lemmy,donate,monero,by,to,from,transfer_community,transfer_site,are_you_sure,yes,no,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message,time,action
ca | 98% | cross_posted_to,old,support_on_liberapay,time,action
de | 86% | cross_posted_to,create_private_message,send_secure_message,send_message,message,avatar,upload_avatar,show_avatars,old,docs,message_sent,messages,old_password,matrix_user_id,private_message_disclaimer,send_notifications_to_email,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,support_on_liberapay,donate_to_lemmy,donate,from,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message,time,action
fa | 72% | cross_post,cross_posted_to,subscribed_to_communities,trending_communities,create_private_message,send_secure_message,send_message,message,mod,mods,moderates,remove_as_mod,appoint_as_mod,modlog,stickied,ban,ban_from_site,unban,unban_from_site,banned,number_of_subscribers,subscribers,both,saved,unsubscribe,subscribe,subscribed,old,api,docs,inbox,inbox_for,message_sent,notifications_error,messages,no_email_setup,matrix_user_id,private_message_disclaimer,url,body,copy_suggested_title,community,expand_here,subscribe_to_communities,theme,sponsor_message,support_on_liberapay,general_sponsors,joined,by,to,from,landing_0,logged_in,community_moderator_already_exists,community_follower_already_exists,community_user_already_banned,no_slurs,admin_already_created,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message,time,action
eo | 74% | cross_posted_to,number_of_communities,create_private_message,send_secure_message,send_message,message,preview,upload_image,avatar,upload_avatar,show_avatars,formatting_help,view_source,sticky,unsticky,archive_link,stickied,delete_account,delete_account_confirm,banned,creator,number_online,old,docs,replies,mentions,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,theme,support_on_liberapay,donate_to_lemmy,donate,from,are_you_sure,yes,no,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message,time,action
es | 99% | cross_posted_to,support_on_liberapay
fi | 98% | cross_posted_to,old,support_on_liberapay,time,action
fr | 81% | cross_posted_to,create_private_message,send_secure_message,send_message,message,avatar,upload_avatar,show_avatars,archive_link,old,docs,replies,mentions,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,support_on_liberapay,donate_to_lemmy,donate,from,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message,time,action
it | 82% | cross_posted_to,create_private_message,send_secure_message,send_message,message,avatar,upload_avatar,show_avatars,archive_link,old,docs,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,support_on_liberapay,donate_to_lemmy,donate,from,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message,time,action
nl | 98% | cross_posted_to,support_on_liberapay,time,action
pt-br | 100% | support_on_liberapay
ru | 70% | cross_posts,cross_post,cross_posted_to,number_of_communities,create_private_message,send_secure_message,send_message,message,preview,upload_image,avatar,upload_avatar,show_avatars,formatting_help,view_source,sticky,unsticky,archive_link,stickied,delete_account,delete_account_confirm,banned,creator,number_online,old,docs,replies,mentions,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,recent_comments,theme,support_on_liberapay,donate_to_lemmy,donate,monero,by,to,from,transfer_community,transfer_site,are_you_sure,yes,no,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message,time,action
sv | 81% | cross_posted_to,create_private_message,send_secure_message,send_message,message,avatar,upload_avatar,show_avatars,archive_link,old,docs,replies,mentions,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,support_on_liberapay,donate_to_lemmy,donate,from,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message,time,action
zh | 69% | cross_posts,cross_post,cross_posted_to,users,number_of_communities,create_private_message,send_secure_message,send_message,message,preview,upload_image,avatar,upload_avatar,show_avatars,formatting_help,view_source,sticky,unsticky,archive_link,settings,stickied,delete_account,delete_account_confirm,banned,creator,number_online,old,docs,replies,mentions,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,recent_comments,nsfw,show_nsfw,theme,support_on_liberapay,donate_to_lemmy,donate,monero,by,to,from,transfer_community,transfer_site,are_you_sure,yes,no,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message,time,action
<!-- translationsstop -->
If you'd like to update this report, run:

2
ansible/VERSION vendored
View File

@ -1 +1 @@
v0.6.10
v0.6.11

View File

@ -11,7 +11,7 @@ services:
- lemmy_db:/var/lib/postgresql/data
restart: always
lemmy:
image: dessalines/lemmy:v0.6.10
image: dessalines/lemmy:v0.6.11
ports:
- "127.0.0.1:8536:8536"
restart: always

View File

@ -1 +1 @@
pub const VERSION: &str = "v0.6.10";
pub const VERSION: &str = "v0.6.11";

View File

@ -254,6 +254,8 @@ export class Community extends Component<any, State> {
toast(i18n.t(msg.error), 'danger');
this.context.router.history.push('/');
return;
} else if (msg.reconnect) {
this.fetchPosts();
} else if (res.op == UserOperation.GetCommunity) {
let data = res.data as GetCommunityResponse;
this.state.community = data.community;

View File

@ -313,6 +313,8 @@ export class Inbox extends Component<any, InboxState> {
if (msg.error) {
toast(i18n.t(msg.error), 'danger');
return;
} else if (msg.reconnect) {
this.refetch();
} else if (res.op == UserOperation.GetReplies) {
let data = res.data as GetRepliesResponse;
this.state.replies = data.replies;

View File

@ -537,6 +537,8 @@ export class Main extends Component<any, MainState> {
if (msg.error) {
toast(i18n.t(msg.error), 'danger');
return;
} else if (msg.reconnect) {
this.fetchPosts();
} else if (res.op == UserOperation.GetFollowedCommunities) {
let data = res.data as GetFollowedCommunitiesResponse;
this.state.subscribedCommunities = data.communities;

View File

@ -208,6 +208,8 @@ export class Navbar extends Component<any, NavbarState> {
location.reload();
}
return;
} else if (msg.reconnect) {
this.fetchUnreads();
} else if (res.op == UserOperation.GetReplies) {
let data = res.data as GetRepliesResponse;
let unreadReplies = data.replies.filter(r => !r.read);

View File

@ -332,7 +332,9 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
<ul class="list-inline mb-1 text-muted small">
{this.props.post.duplicates && (
<>
<li className="list-inline-item mr-2">cross-posted to:</li>
<li className="list-inline-item mr-2">
{i18n.t('cross_posted_to')}
</li>
{this.props.post.duplicates.map(post => (
<li className="list-inline-item mr-2">
<Link to={`/post/${post.id}`}>{post.community_name}</Link>

View File

@ -3,6 +3,7 @@ import { Link } from 'inferno-router';
import { Post } from '../interfaces';
import { PostListing } from './post-listing';
import { i18n } from '../i18next';
import { T } from 'inferno-i18next';
interface PostListingsProps {
posts: Array<Post>;
@ -36,11 +37,9 @@ export class PostListings extends Component<PostListingsProps, any> {
<>
<div>{i18n.t('no_posts')}</div>
{this.props.showCommunity !== undefined && (
<div>
<Link to="/communities">
{i18n.t('subscribe_to_communities')}
</Link>
</div>
<T i18nKey="subscribe_to_communities">
#<Link to="/communities">#</Link>
</T>
)}
</>
)}

View File

@ -370,6 +370,10 @@ export class Post extends Component<any, PostState> {
if (msg.error) {
toast(i18n.t(msg.error), 'danger');
return;
} else if (msg.reconnect) {
WebSocketService.Instance.getPost({
id: Number(this.props.match.params.id),
});
} else if (res.op == UserOperation.GetPost) {
let data = res.data as GetPostResponse;
this.state.post = data.post;

View File

@ -47,7 +47,13 @@ export class Sponsors extends Component<any, any> {
#<a href="https://github.com/dessalines/lemmy">#</a>
</T>
</p>
<a class="btn btn-secondary" href="https://www.patreon.com/dessalines">
<a class="btn btn-secondary" href="https://liberapay.com/Lemmy/">
{i18n.t('support_on_liberapay')}
</a>
<a
class="btn btn-secondary ml-2"
href="https://www.patreon.com/dessalines"
>
{i18n.t('support_on_patreon')}
</a>
</div>

View File

@ -998,6 +998,8 @@ export class User extends Component<any, UserState> {
}
this.setState(this.state);
return;
} else if (msg.reconnect) {
this.refetch();
} else if (res.op == UserOperation.GetUserDetails) {
let data = res.data as UserDetailsResponse;
this.state.user = data.user;

2
ui/src/i18next.ts vendored
View File

@ -13,6 +13,7 @@ import { it } from './translations/it';
import { fi } from './translations/fi';
import { ca } from './translations/ca';
import { fa } from './translations/fa';
import { pt_BR } from './translations/pt_br';
// https://github.com/nimbusec-oss/inferno-i18next/blob/master/tests/T.test.js#L66
const resources = {
@ -29,6 +30,7 @@ const resources = {
fi,
ca,
fa,
pt_BR,
};
function format(value: any, format: any, lng: any): any {

View File

@ -854,4 +854,5 @@ export interface WebSocketJsonResponse {
op?: string;
data?: ResponseType;
error?: string;
reconnect?: boolean;
}

View File

@ -40,6 +40,7 @@ import {
GetPrivateMessagesForm,
UserJoinForm,
MessageType,
WebSocketJsonResponse,
} from '../interfaces';
import { UserService } from './';
import { i18n } from '../i18next';
@ -59,17 +60,21 @@ export class WebSocketService {
private constructor() {
this.ws = new ReconnectingWebSocket(wsUri);
this.ws.onopen = () => {
console.log(`Connected to ${wsUri}`);
if (UserService.Instance.user) {
this.userJoin();
}
};
this.subject = Observable.create((obs: any) => {
this.ws.onmessage = e => {
obs.next(JSON.parse(e.data));
};
this.ws.onopen = () => {
console.log(`Connected to ${wsUri}`);
if (UserService.Instance.user) {
this.userJoin();
}
let res: WebSocketJsonResponse = {
reconnect: true,
};
obs.next(res);
};
}).pipe(share());
}

View File

@ -10,6 +10,7 @@ export const en = {
related_posts: 'These posts might be related',
cross_posts: 'This link has also been posted to:',
cross_post: 'cross-post',
cross_posted_to: 'cross-posted to: ',
comments: 'Comments',
number_of_comments: '{{count}} Comments',
remove_comment: 'Remove Comment',
@ -170,6 +171,7 @@ export const en = {
sponsor_message:
'Lemmy is free, <1>open-source</1> software, meaning no advertising, monetizing, or venture capital, ever. Your donations directly support full-time development of the project. Thank you to the following people:',
support_on_patreon: 'Support on Patreon',
support_on_liberapay: 'Support on Liberapay',
donate_to_lemmy: 'Donate to Lemmy',
donate: 'Donate',
general_sponsors:

240
ui/src/translations/pt_br.ts vendored Normal file
View File

@ -0,0 +1,240 @@
export const pt_BR = {
translation: {
post: 'publicação',
remove_post: 'Apagar publicação',
no_posts: 'Sem publicações.',
create_a_post: 'Criar uma publicação',
create_post: 'Criar publicação',
number_of_posts: '{{count}} publicações',
posts: 'Publicações',
related_posts: 'Essas publicações podem estar relacionadas',
cross_posts: 'Esse link também foi publicado em:',
cross_post: 're-publicar',
cross_posted_to: 'Publicado também em: ',
comments: 'Comentários',
number_of_comments: '{{count}} comentários',
remove_comment: 'Apagar comentário',
communities: 'Comunidades',
users: 'Usuários',
create_a_community: 'Criar uma comunidade',
create_community: 'Criar comunidade',
remove_community: 'Apagar comunidade',
subscribed_to_communities: 'Inscrito em <1>comunidades</1>',
trending_communities: '<1>Comunidades</1> em tendência',
list_of_communities: 'Lista de comunidades',
number_of_communities: '{{count}} comunidades',
community_reqs: 'minúsculas, sublinhados e sem espaços.',
create_private_message: 'Criar mensagem privada',
send_secure_message: 'Enviar mensagem segura',
send_message: 'Enviar mensagem',
message: 'Mensagem',
edit: 'editar',
reply: 'responder',
cancel: 'Cancelar',
preview: 'Pré-visualização',
upload_image: 'fazer upload de imagem',
avatar: 'Avatar',
upload_avatar: 'Fazer upload de avatar',
show_avatars: 'Mostrar Avatars',
formatting_help: 'ajuda de formatação',
view_source: 'ver fonte',
unlock: 'desbloquear',
lock: 'bloquear',
sticky: 'fixar',
unsticky: 'desafixar',
link: 'link',
archive_link: 'arquivar link',
mod: 'moderador',
mods: 'moderadores',
moderates: 'Modera',
settings: 'Configurações',
remove_as_mod: 'remover como moderador',
appoint_as_mod: 'designar como moderador',
modlog: 'Registro de moderação',
admin: 'administrador',
admins: 'administradores',
remove_as_admin: 'remover como administrador',
appoint_as_admin: 'designar como administrador',
remove: 'remover',
removed: 'removido',
locked: 'trancado',
stickied: 'fixado',
reason: 'Motivo',
mark_as_read: 'marcar como lido',
mark_as_unread: 'marcar como não lido',
delete: 'apagar',
deleted: 'apagado',
delete_account: 'Apagar conta',
delete_account_confirm:
'Aviso: isso vai apagar seus dados de forma permanente. Escreva sua senha para confirmar.',
restore: 'restaurar',
ban: 'banir',
ban_from_site: 'banido do site',
unban: 'readmitido',
unban_from_site: 'readmitido ao site',
banned: 'banido',
save: 'guardar',
unsave: 'descartar',
create: 'criar',
creator: 'criador',
username: 'nome de usuário',
email_or_username: 'E-mail ou nome de usuário',
number_of_users: '{{count}} usuários',
number_of_subscribers: '{{count}} inscritos',
number_of_points: '{{count}} pontos',
number_online: '{{count}} usuários online',
name: 'Nome',
title: 'Título',
category: 'Categoria',
subscribers: 'Inscritos',
both: 'Ambos',
saved: 'Guardado',
unsubscribe: 'Cancelar inscrição',
subscribe: 'Inscrever-se',
subscribed: 'Inscrito',
prev: 'Anterior',
next: 'Próximo',
sidebar: 'Barra lateral',
sort_type: 'Ordenação',
hot: 'Popular',
new: 'Novo',
old: 'Velho',
top_day: 'Top do dia',
week: 'Semana',
month: 'Mês',
year: 'Ano',
all: 'Tudo',
top: 'Top',
api: 'API',
docs: 'Docs',
inbox: 'Caixa de entrada',
inbox_for: 'Caixa de entrada de <1>{{user}}</1>',
mark_all_as_read: 'marcar tudo como lido',
type: 'Tipo',
unread: 'Não lido',
replies: 'Respostas',
mentions: 'Menções',
reply_sent: 'Resposta enviada',
message_sent: 'Mensagem enviada',
search: 'Busca',
overview: 'Visão geral',
view: 'Visualização',
logout: 'Sair',
login_sign_up: 'Entrar / Inscrever-se',
login: 'Entrar',
sign_up: 'Inscrever-se',
notifications_error:
'Seu navegador não oferece notificações para a área de trabalho. Tente o Firefox ou o Chrome.',
unread_messages: 'Mensagens não lidas',
messages: 'Mensagens',
password: 'Senha',
verify_password: 'Verifique a senha',
old_password: 'Senha antiga',
forgot_password: 'esqueci a senha',
reset_password_mail_sent: 'Enviado um e-mail para a alteração da senha.',
password_change: 'Alteração de senha',
new_password: 'Nova senha',
no_email_setup: 'Esse servidor não configurou corretamente o e-mail.',
email: 'E-mail',
matrix_user_id: 'Usuário Matrix',
private_message_disclaimer:
'Aviso: mensagens privadas no Lemmy não são seguras. Crie uma conta em <1>Riot.im</1> para troca segura de mensagens.',
send_notifications_to_email: 'Enviar notificações para o e-mail',
optional: 'Opcional',
expires: 'Expira',
language: 'Idioma',
browser_default: 'Padrão do navegador',
downvotes_disabled: 'Votos negativos desativados',
enable_downvotes: 'Permitir votos negativos',
open_registration: 'Permitir registro',
registration_closed: 'Registros desativados',
enable_nsfw: 'Permitir NSFW',
url: 'URL',
body: 'Conteúdo',
copy_suggested_title: 'copiar título sugerido: {{title}}',
community: 'Comunidade',
expand_here: 'Expandir aqui',
subscribe_to_communities: 'Inscreva-se em algumas <1>comunidades</1>.',
chat: 'Chat',
recent_comments: 'Últimos comentários',
no_results: 'Nenhum resultado.',
setup: 'Instalação',
lemmy_instance_setup: 'Criação de instância Lemmy',
setup_admin: 'Configurar administrador do site',
your_site: 'seu site',
modified: 'modificado',
nsfw: 'NSFW',
show_nsfw: 'Mostrar conteúdo NSFW',
theme: 'Tema',
sponsors: 'Patrocinadores',
sponsors_of_lemmy: 'Patrocinadores do Lemmy',
sponsor_message:
'Lemmy é um programa livre e de código aberto, o que significa que não haverá publicidade, monetização ou capital de risco, jamais. Suas doações apoiam de forma direta o desenvolvimento em tempo integral do projeto. Muitos agradecimentos às sequintes pessoas:',
support_on_patreon: 'Colabore no Patreon',
donate_to_lemmy: 'Faça uma doação ao Lemmy',
donate: 'Doar',
general_sponsors:
'Patrocinadores são aqueles que doaram entre $10 e $39 ao Lemmy.',
crypto: 'Crypto',
bitcoin: 'Bitcoin',
ethereum: 'Ethereum',
monero: 'Monero',
code: 'Code',
joined: 'Entrou',
by: 'por',
to: 'para',
from: 'de',
transfer_community: 'transferir comunidade',
transfer_site: 'transferir site',
are_you_sure: 'tem certeza?',
yes: 'sim',
no: 'não',
powered_by: 'Powered by',
landing_0:
'Lemmy é um <1>agregador de links</1> / alternativa ao reddit, com a intenção de funcionar junto ao <2>fediverso</2>.<3></3>Pode ser hospedado em servidor próprio, tem atualização de comentários em tempo real e é minúsculo (<4>~80kB</4>). A federação com a rede ActivityPub está no roteiro do projeto. <5></5>Esta é uma <6>versão beta bastante antecipada</6>, e muitas funcionalidades ainda estão quebradas ou ausentes. <7></7>Sugira novas funcionalidades ou reporte erros <8>aqui.</8><9></9>Feito com <10>Rust</10>, <11>Actix</11>, <12>Inferno</12>, <13>Typescript</13>.',
not_logged_in: 'Não autenticado.',
logged_in: 'Autenticado.',
community_ban: 'Você foi banido desta comunidade.',
site_ban: 'Você foi banido do site',
couldnt_create_comment: 'Não foi possível criar o comentário.',
couldnt_like_comment: 'Não foi possível curtir o comentário.',
couldnt_update_comment: 'Não foi possível atualizar o comentário.',
couldnt_save_comment: 'Não foi possível guardar o comentário.',
no_comment_edit_allowed: 'Sem permissão para editar de comentário.',
no_post_edit_allowed: 'Sem permissão para editar publicação.',
no_community_edit_allowed: 'Sem permissão para editar comunidade.',
couldnt_find_community: 'Não foi possível encontrar a comunidade.',
couldnt_update_community: 'Não foi possível atualizar a comunidade.',
community_already_exists: 'Esta comunidade já existe.',
community_moderator_already_exists:
'Este moderador da comunidade já existe.',
community_follower_already_exists: 'Este seguidor da comunidade já existe.',
community_user_already_banned: 'Este usuário da comunidade já foi banido.',
couldnt_create_post: 'Não foi possível criar a publicação.',
couldnt_like_post: 'Não foi possível curtir a publicação.',
couldnt_find_post: 'Não foi possível encontrar a publicação.',
couldnt_get_posts: 'Não foi possível obter as publicações',
couldnt_update_post: 'Não foi possível atualizar a publicação',
couldnt_save_post: 'Não foi possível guardar a publicação.',
no_slurs: 'Sem insultos.',
not_an_admin: 'Não é administrador.',
site_already_exists: 'O site já existe.',
couldnt_update_site: 'Não foi possível atualizar o site.',
couldnt_find_that_username_or_email:
'Não foi possível encontrar esse usuário ou e-mail.',
password_incorrect: 'Senha incorreta.',
passwords_dont_match: 'As senhas não são iguais.',
admin_already_created: 'Desculpe, já há um administrador.',
user_already_exists: 'Este usuário já existe.',
email_already_exists: 'Este e-mail já existe.',
couldnt_update_user: 'Não foi possível atualizar o usuário.',
system_err_login: 'Erro no sistema. Tente sair e autenticar-se outra vez.',
couldnt_create_private_message: 'Não foi possível criar mensagem privada.',
no_private_message_edit_allowed:
'Sem permissão para editar mensagem privada.',
couldnt_update_private_message:
'Não foi possível atualizar a mensagem privada.',
time: 'Tempo',
action: 'Ação',
},
};

4
ui/src/utils.ts vendored
View File

@ -10,6 +10,7 @@ import 'moment/locale/it';
import 'moment/locale/fi';
import 'moment/locale/ca';
import 'moment/locale/fa';
import 'moment/locale/pt-br';
import {
UserOperation,
@ -260,6 +261,7 @@ export const languages = [
{ code: 'es', name: 'Español' },
{ code: 'de', name: 'Deutsch' },
{ code: 'fa', name: 'فارسی' },
{ code: 'pt_BR', name: 'Português Brasileiro' },
{ code: 'zh', name: '中文' },
{ code: 'fi', name: 'Suomi' },
{ code: 'fr', name: 'Français' },
@ -310,6 +312,8 @@ export function getMomentLanguage(): string {
lang = 'ca';
} else if (lang.startsWith('fa')) {
lang = 'fa';
} else if (lang.startsWith('pt')) {
lang = 'pt-br';
} else {
lang = 'en';
}

2
ui/src/version.ts vendored
View File

@ -1 +1 @@
export const version: string = 'v0.6.10';
export const version: string = 'v0.6.11';

View File

@ -11,6 +11,7 @@ import { nl } from './src/translations/nl';
import { it } from './src/translations/it';
import { fi } from './src/translations/fi';
import { ca } from './src/translations/ca';
import { pt_BR } from './src/translations/pt_br';
import fs from 'fs';
const files = [
@ -23,6 +24,7 @@ const files = [
{ t: fr, n: 'fr' },
{ t: it, n: 'it' },
{ t: nl, n: 'nl' },
{ t: pt_BR, n: 'pt-br' },
{ t: ru, n: 'ru' },
{ t: sv, n: 'sv' },
{ t: zh, n: 'zh' },