rename, add Polish translation

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2021-09-10 12:41:42 +02:00
parent 3672d9faa5
commit 125f446eed
4 changed files with 44 additions and 43 deletions

View file

@ -10,13 +10,13 @@ export const FAVOURITED_STATUSES_EXPAND_REQUEST = 'FAVOURITED_STATUSES_EXPAND_RE
export const FAVOURITED_STATUSES_EXPAND_SUCCESS = 'FAVOURITED_STATUSES_EXPAND_SUCCESS'; export const FAVOURITED_STATUSES_EXPAND_SUCCESS = 'FAVOURITED_STATUSES_EXPAND_SUCCESS';
export const FAVOURITED_STATUSES_EXPAND_FAIL = 'FAVOURITED_STATUSES_EXPAND_FAIL'; export const FAVOURITED_STATUSES_EXPAND_FAIL = 'FAVOURITED_STATUSES_EXPAND_FAIL';
export const USER_FAVOURITED_STATUSES_FETCH_REQUEST = 'USER_FAVOURITED_STATUSES_FETCH_REQUEST'; export const ACCOUNT_FAVOURITED_STATUSES_FETCH_REQUEST = 'ACCOUNT_FAVOURITED_STATUSES_FETCH_REQUEST';
export const USER_FAVOURITED_STATUSES_FETCH_SUCCESS = 'USER_FAVOURITED_STATUSES_FETCH_SUCCESS'; export const ACCOUNT_FAVOURITED_STATUSES_FETCH_SUCCESS = 'ACCOUNT_FAVOURITED_STATUSES_FETCH_SUCCESS';
export const USER_FAVOURITED_STATUSES_FETCH_FAIL = 'USER_FAVOURITED_STATUSES_FETCH_FAIL'; export const ACCOUNT_FAVOURITED_STATUSES_FETCH_FAIL = 'ACCOUNT_FAVOURITED_STATUSES_FETCH_FAIL';
export const USER_FAVOURITED_STATUSES_EXPAND_REQUEST = 'USER_FAVOURITED_STATUSES_EXPAND_REQUEST'; export const ACCOUNT_FAVOURITED_STATUSES_EXPAND_REQUEST = 'ACCOUNT_FAVOURITED_STATUSES_EXPAND_REQUEST';
export const USER_FAVOURITED_STATUSES_EXPAND_SUCCESS = 'USER_FAVOURITED_STATUSES_EXPAND_SUCCESS'; export const ACCOUNT_FAVOURITED_STATUSES_EXPAND_SUCCESS = 'ACCOUNT_FAVOURITED_STATUSES_EXPAND_SUCCESS';
export const USER_FAVOURITED_STATUSES_EXPAND_FAIL = 'USER_FAVOURITED_STATUSES_EXPAND_FAIL'; export const ACCOUNT_FAVOURITED_STATUSES_EXPAND_FAIL = 'ACCOUNT_FAVOURITED_STATUSES_EXPAND_FAIL';
export function fetchFavouritedStatuses() { export function fetchFavouritedStatuses() {
return (dispatch, getState) => { return (dispatch, getState) => {
@ -105,7 +105,7 @@ export function expandFavouritedStatusesFail(error) {
}; };
} }
export function fetchUserFavouritedStatuses(accountId) { export function fetchAccountFavouritedStatuses(accountId) {
return (dispatch, getState) => { return (dispatch, getState) => {
if (!isLoggedIn(getState)) return; if (!isLoggedIn(getState)) return;
@ -113,29 +113,29 @@ export function fetchUserFavouritedStatuses(accountId) {
return; return;
} }
dispatch(fetchUserFavouritedStatusesRequest(accountId)); dispatch(fetchAccountFavouritedStatusesRequest(accountId));
api(getState).get(`/api/v1/pleroma/accounts/${accountId}/favourites`).then(response => { api(getState).get(`/api/v1/pleroma/accounts/${accountId}/favourites`).then(response => {
const next = getLinks(response).refs.find(link => link.rel === 'next'); const next = getLinks(response).refs.find(link => link.rel === 'next');
dispatch(importFetchedStatuses(response.data)); dispatch(importFetchedStatuses(response.data));
dispatch(fetchUserFavouritedStatusesSuccess(accountId, response.data, next ? next.uri : null)); dispatch(fetchAccountFavouritedStatusesSuccess(accountId, response.data, next ? next.uri : null));
}).catch(error => { }).catch(error => {
dispatch(fetchUserFavouritedStatusesFail(accountId, error)); dispatch(fetchAccountFavouritedStatusesFail(accountId, error));
}); });
}; };
} }
export function fetchUserFavouritedStatusesRequest(accountId) { export function fetchAccountFavouritedStatusesRequest(accountId) {
return { return {
type: USER_FAVOURITED_STATUSES_FETCH_REQUEST, type: ACCOUNT_FAVOURITED_STATUSES_FETCH_REQUEST,
accountId, accountId,
skipLoading: true, skipLoading: true,
}; };
} }
export function fetchUserFavouritedStatusesSuccess(accountId, statuses, next) { export function fetchAccountFavouritedStatusesSuccess(accountId, statuses, next) {
return { return {
type: USER_FAVOURITED_STATUSES_FETCH_SUCCESS, type: ACCOUNT_FAVOURITED_STATUSES_FETCH_SUCCESS,
accountId, accountId,
statuses, statuses,
next, next,
@ -143,16 +143,16 @@ export function fetchUserFavouritedStatusesSuccess(accountId, statuses, next) {
}; };
} }
export function fetchUserFavouritedStatusesFail(accountId, error) { export function fetchAccountFavouritedStatusesFail(accountId, error) {
return { return {
type: USER_FAVOURITED_STATUSES_FETCH_FAIL, type: ACCOUNT_FAVOURITED_STATUSES_FETCH_FAIL,
accountId, accountId,
error, error,
skipLoading: true, skipLoading: true,
}; };
} }
export function expandUserFavouritedStatuses(accountId) { export function expandAccountFavouritedStatuses(accountId) {
return (dispatch, getState) => { return (dispatch, getState) => {
if (!isLoggedIn(getState)) return; if (!isLoggedIn(getState)) return;
@ -162,37 +162,37 @@ export function expandUserFavouritedStatuses(accountId) {
return; return;
} }
dispatch(expandUserFavouritedStatusesRequest(accountId)); dispatch(expandAccountFavouritedStatusesRequest(accountId));
api(getState).get(url).then(response => { api(getState).get(url).then(response => {
const next = getLinks(response).refs.find(link => link.rel === 'next'); const next = getLinks(response).refs.find(link => link.rel === 'next');
dispatch(importFetchedStatuses(response.data)); dispatch(importFetchedStatuses(response.data));
dispatch(expandUserFavouritedStatusesSuccess(accountId, response.data, next ? next.uri : null)); dispatch(expandAccountFavouritedStatusesSuccess(accountId, response.data, next ? next.uri : null));
}).catch(error => { }).catch(error => {
dispatch(expandUserFavouritedStatusesFail(accountId, error)); dispatch(expandAccountFavouritedStatusesFail(accountId, error));
}); });
}; };
} }
export function expandUserFavouritedStatusesRequest(accountId) { export function expandAccountFavouritedStatusesRequest(accountId) {
return { return {
type: USER_FAVOURITED_STATUSES_EXPAND_REQUEST, type: ACCOUNT_FAVOURITED_STATUSES_EXPAND_REQUEST,
accountId, accountId,
}; };
} }
export function expandUserFavouritedStatusesSuccess(accountId, statuses, next) { export function expandAccountFavouritedStatusesSuccess(accountId, statuses, next) {
return { return {
type: USER_FAVOURITED_STATUSES_EXPAND_SUCCESS, type: ACCOUNT_FAVOURITED_STATUSES_EXPAND_SUCCESS,
accountId, accountId,
statuses, statuses,
next, next,
}; };
} }
export function expandUserFavouritedStatusesFail(accountId, error) { export function expandAccountFavouritedStatusesFail(accountId, error) {
return { return {
type: USER_FAVOURITED_STATUSES_EXPAND_FAIL, type: ACCOUNT_FAVOURITED_STATUSES_EXPAND_FAIL,
accountId, accountId,
error, error,
}; };

View file

@ -2,7 +2,7 @@ import React from 'react';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePropTypes from 'react-immutable-proptypes';
import { fetchFavouritedStatuses, expandFavouritedStatuses, fetchUserFavouritedStatuses, expandUserFavouritedStatuses } from '../../actions/favourites'; import { fetchFavouritedStatuses, expandFavouritedStatuses, fetchAccountFavouritedStatuses, expandAccountFavouritedStatuses } from '../../actions/favourites';
import Column from '../ui/components/column'; import Column from '../ui/components/column';
import StatusList from '../../components/status_list'; import StatusList from '../../components/status_list';
import { injectIntl, FormattedMessage } from 'react-intl'; import { injectIntl, FormattedMessage } from 'react-intl';
@ -75,7 +75,7 @@ class Favourites extends ImmutablePureComponent {
else { else {
if (accountId && accountId !== -1) { if (accountId && accountId !== -1) {
this.props.dispatch(fetchAccount(accountId)); this.props.dispatch(fetchAccount(accountId));
this.props.dispatch(fetchUserFavouritedStatuses(accountId)); this.props.dispatch(fetchAccountFavouritedStatuses(accountId));
} else { } else {
this.props.dispatch(fetchAccountByUsername(username)); this.props.dispatch(fetchAccountByUsername(username));
} }
@ -87,7 +87,7 @@ class Favourites extends ImmutablePureComponent {
if (!isMyAccount && accountId && accountId !== -1 && (accountId !== prevProps.accountId && accountId)) { if (!isMyAccount && accountId && accountId !== -1 && (accountId !== prevProps.accountId && accountId)) {
this.props.dispatch(fetchAccount(accountId)); this.props.dispatch(fetchAccount(accountId));
this.props.dispatch(fetchUserFavouritedStatuses(accountId)); this.props.dispatch(fetchAccountFavouritedStatuses(accountId));
} }
} }
@ -97,7 +97,7 @@ class Favourites extends ImmutablePureComponent {
if (isMyAccount) { if (isMyAccount) {
this.props.dispatch(expandFavouritedStatuses()); this.props.dispatch(expandFavouritedStatuses());
} else { } else {
this.props.dispatch(expandUserFavouritedStatuses(accountId)); this.props.dispatch(expandAccountFavouritedStatuses(accountId));
} }
}, 300, { leading: true }) }, 300, { leading: true })

View file

@ -312,6 +312,7 @@
"emoji_button.search_results": "Wyniki wyszukiwania", "emoji_button.search_results": "Wyniki wyszukiwania",
"emoji_button.symbols": "Symbole", "emoji_button.symbols": "Symbole",
"emoji_button.travel": "Podróże i miejsca", "emoji_button.travel": "Podróże i miejsca",
"empty_column.account_favourited_statuses": "Ten użytkownik nie polubił jeszcze żadnego wpisu.",
"empty_column.account_timeline": "Brak wpisów tutaj!", "empty_column.account_timeline": "Brak wpisów tutaj!",
"empty_column.account_unavailable": "Profil niedostępny", "empty_column.account_unavailable": "Profil niedostępny",
"empty_column.aliases": "Nie utworzyłeś(-aś) jeszcze żadnego aliasu konta.", "empty_column.aliases": "Nie utworzyłeś(-aś) jeszcze żadnego aliasu konta.",
@ -321,7 +322,7 @@
"empty_column.community": "Lokalna oś czasu jest pusta. Napisz coś publicznie, aby zagaić!", "empty_column.community": "Lokalna oś czasu jest pusta. Napisz coś publicznie, aby zagaić!",
"empty_column.direct": "Nie masz żadnych wiadomości bezpośrednich. Kiedy dostaniesz lub wyślesz jakąś, pojawi się ona tutaj.", "empty_column.direct": "Nie masz żadnych wiadomości bezpośrednich. Kiedy dostaniesz lub wyślesz jakąś, pojawi się ona tutaj.",
"empty_column.domain_blocks": "Brak ukrytych domen.", "empty_column.domain_blocks": "Brak ukrytych domen.",
"empty_column.favourited_statuses": "Nie dodałeś(-aś) żadnego wpisu do ulubionych. Kiedy to zrobisz, pojawi się on tutaj.", "empty_column.favourited_statuses": "Nie polubiłeś(-aś) żadnego wpisu. Kiedy to zrobisz, pojawi się on tutaj.",
"empty_column.favourites": "Nikt nie dodał tego wpisu do ulubionych. Gdy ktoś to zrobi, pojawi się tutaj.", "empty_column.favourites": "Nikt nie dodał tego wpisu do ulubionych. Gdy ktoś to zrobi, pojawi się tutaj.",
"empty_column.filters": "Nie wyciszyłeś(-aś) jeszcze żadnego słowa.", "empty_column.filters": "Nie wyciszyłeś(-aś) jeszcze żadnego słowa.",
"empty_column.follow_requests": "Nie masz żadnych próśb o możliwość śledzenia. Kiedy ktoś utworzy ją, pojawi się tutaj.", "empty_column.follow_requests": "Nie masz żadnych próśb o możliwość śledzenia. Kiedy ktoś utworzy ją, pojawi się tutaj.",

View file

@ -5,12 +5,12 @@ import {
FAVOURITED_STATUSES_EXPAND_REQUEST, FAVOURITED_STATUSES_EXPAND_REQUEST,
FAVOURITED_STATUSES_EXPAND_SUCCESS, FAVOURITED_STATUSES_EXPAND_SUCCESS,
FAVOURITED_STATUSES_EXPAND_FAIL, FAVOURITED_STATUSES_EXPAND_FAIL,
USER_FAVOURITED_STATUSES_FETCH_REQUEST, ACCOUNT_FAVOURITED_STATUSES_FETCH_REQUEST,
USER_FAVOURITED_STATUSES_FETCH_SUCCESS, ACCOUNT_FAVOURITED_STATUSES_FETCH_SUCCESS,
USER_FAVOURITED_STATUSES_FETCH_FAIL, ACCOUNT_FAVOURITED_STATUSES_FETCH_FAIL,
USER_FAVOURITED_STATUSES_EXPAND_REQUEST, ACCOUNT_FAVOURITED_STATUSES_EXPAND_REQUEST,
USER_FAVOURITED_STATUSES_EXPAND_SUCCESS, ACCOUNT_FAVOURITED_STATUSES_EXPAND_SUCCESS,
USER_FAVOURITED_STATUSES_EXPAND_FAIL, ACCOUNT_FAVOURITED_STATUSES_EXPAND_FAIL,
} from '../actions/favourites'; } from '../actions/favourites';
import { import {
BOOKMARKED_STATUSES_FETCH_REQUEST, BOOKMARKED_STATUSES_FETCH_REQUEST,
@ -107,15 +107,15 @@ export default function statusLists(state = initialState, action) {
return normalizeList(state, 'favourites', action.statuses, action.next); return normalizeList(state, 'favourites', action.statuses, action.next);
case FAVOURITED_STATUSES_EXPAND_SUCCESS: case FAVOURITED_STATUSES_EXPAND_SUCCESS:
return appendToList(state, 'favourites', action.statuses, action.next); return appendToList(state, 'favourites', action.statuses, action.next);
case USER_FAVOURITED_STATUSES_FETCH_REQUEST: case ACCOUNT_FAVOURITED_STATUSES_FETCH_REQUEST:
case USER_FAVOURITED_STATUSES_EXPAND_REQUEST: case ACCOUNT_FAVOURITED_STATUSES_EXPAND_REQUEST:
return setLoading(state, `favourites:${action.accountId}`, true); return setLoading(state, `favourites:${action.accountId}`, true);
case USER_FAVOURITED_STATUSES_FETCH_FAIL: case ACCOUNT_FAVOURITED_STATUSES_FETCH_FAIL:
case USER_FAVOURITED_STATUSES_EXPAND_FAIL: case ACCOUNT_FAVOURITED_STATUSES_EXPAND_FAIL:
return setLoading(state, `favourites:${action.accountId}`, false); return setLoading(state, `favourites:${action.accountId}`, false);
case USER_FAVOURITED_STATUSES_FETCH_SUCCESS: case ACCOUNT_FAVOURITED_STATUSES_FETCH_SUCCESS:
return normalizeList(state, `favourites:${action.accountId}`, action.statuses, action.next); return normalizeList(state, `favourites:${action.accountId}`, action.statuses, action.next);
case USER_FAVOURITED_STATUSES_EXPAND_SUCCESS: case ACCOUNT_FAVOURITED_STATUSES_EXPAND_SUCCESS:
return appendToList(state, `favourites:${action.accountId}`, action.statuses, action.next); return appendToList(state, `favourites:${action.accountId}`, action.statuses, action.next);
case BOOKMARKED_STATUSES_FETCH_REQUEST: case BOOKMARKED_STATUSES_FETCH_REQUEST:
case BOOKMARKED_STATUSES_EXPAND_REQUEST: case BOOKMARKED_STATUSES_EXPAND_REQUEST: