new translation labels & Portuguese from Portugal translation

This commit is contained in:
André Glatzl committed 2020-11-13 12:18:08 +01:00
1 parent 8d883f89eb
commit 3d1f54f62f
32 files changed
+802 -303

No files matched your search

+6 -3
View File
@@ -5,6 +5,7 @@ import { observer } from "mobx-react";
import { MoreIcon } from "outline-icons";
import { rgba } from "polished";
import * as React from "react";
import { withTranslation } from "react-i18next";
import { PortalWithState } from "react-portal";
import styled from "styled-components";
import { fadeAndScaleIn } from "shared/styles/animations";
@@ -29,6 +30,7 @@ type Props = {
position?: "left" | "right" | "center",
};
@withTranslation()
@observer
class DropdownMenu extends React.Component<Props> {
id: string = `menu${counter++}`;
@@ -51,8 +53,9 @@ class DropdownMenu extends React.Component<Props> {
) => {
return (ev: SyntheticMouseEvent<HTMLElement>) => {
ev.preventDefault();
const { t } = this.props;
const currentTarget = ev.currentTarget;
invariant(document.body, "why you not here");
invariant(document.body, t("why you not here"));
if (currentTarget instanceof HTMLDivElement) {
this.bodyRect = document.body.getBoundingClientRect();
@@ -150,7 +153,7 @@ class DropdownMenu extends React.Component<Props> {
};
render() {
const { className, hover, label, children } = this.props;
const { className, hover, label, children, t } = this.props;
return (
<div className={className}>
@@ -177,7 +180,7 @@ class DropdownMenu extends React.Component<Props> {
{label || (
<NudeButton
id={`${this.id}button`}
aria-label="More options"
aria-label={t("More options")}
aria-haspopup="true"
aria-expanded={isOpen ? "true" : "false"}
aria-controls={this.id}