feat(frontend): add french language file

also expanded translation coverage (still lots to do!)
This commit is contained in:
sct
2020-11-27 05:11:45 +00:00
parent 2aefcfdfb9
commit cd6d8a8216
18 changed files with 749 additions and 111 deletions

View File

@@ -25,6 +25,10 @@ const availableLanguages: AvailableLanguageObject = {
code: 'ja',
display: '日本語',
},
fr: {
code: 'fr',
display: 'Français',
},
};
const LanguagePicker: React.FC = () => {

View File

@@ -3,6 +3,11 @@ import Transition from '../../Transition';
import { useUser } from '../../../hooks/useUser';
import axios from 'axios';
import useClickOutside from '../../../hooks/useClickOutside';
import { defineMessages, FormattedMessage } from 'react-intl';
const messages = defineMessages({
signout: 'Sign Out',
});
const UserDropdown: React.FC = () => {
const dropdownRef = useRef<HTMLDivElement>(null);
@@ -56,7 +61,7 @@ const UserDropdown: React.FC = () => {
role="menuitem"
onClick={() => logout()}
>
Sign out
<FormattedMessage {...messages.signout} />
</a>
</div>
</div>

View File

@@ -5,6 +5,12 @@ import Sidebar from './Sidebar';
import Notifications from './Notifications';
import LanguagePicker from './LanguagePicker';
import { useRouter } from 'next/router';
import { defineMessages, FormattedMessage } from 'react-intl';
const messages = defineMessages({
alphawarning:
'This is ALPHA software. Almost everything is bound to be nearly broken and/or unstable. Please report issues to the Overseerr Github!',
});
const Layout: React.FC = ({ children }) => {
const [isSidebarOpen, setSidebarOpen] = useState(false);
@@ -70,9 +76,7 @@ const Layout: React.FC = ({ children }) => {
</div>
<div className="ml-3 flex-1 md:flex md:justify-between">
<p className="text-sm leading-5 text-white">
This is ALPHA software. Almost everything is bound to be
nearly broken or unstable. Please report issues to the
Overseerr Github!
<FormattedMessage {...messages.alphawarning} />
</p>
<p className="mt-3 text-sm leading-5 md:mt-0 md:ml-6">
<a