mirror of
https://github.com/wassname/talk.git
synced 2026-10-29 13:40:57 +08:00
Add spanish translations and cleaner way to get the activeTabIndex
This commit is contained in:
1 parent
c0bb5e5cb2
commit
cbd7337dbc
2 files changed
+5
-8
No files matched your search
@@ -42,19 +42,14 @@ class Moderation extends Component {
|
||||
const queueConfig = this.props.queueConfig;
|
||||
const activeTab = this.props.activeTab;
|
||||
const assetId = this.props.data.variables.asset_id;
|
||||
|
||||
const menuItems = Object.keys(queueConfig).map((queue) => ({
|
||||
key: queue
|
||||
}));
|
||||
|
||||
let activeTabIndex, nextQueueIndex;
|
||||
for (let i = 0; i < menuItems.length; i++) {
|
||||
if (menuItems[i].key === activeTab){
|
||||
activeTabIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
const activeTabIndex = menuItems.findIndex((item) => item.key === activeTab);
|
||||
const nextQueueIndex = (activeTabIndex === menuItems.length - 1) ? 0 : activeTabIndex + 1;
|
||||
|
||||
nextQueueIndex = (activeTabIndex === menuItems.length - 1) ? 0 : activeTabIndex + 1;
|
||||
this.props.router.push(this.props.getModPath(menuItems[nextQueueIndex].key, assetId));
|
||||
}
|
||||
|
||||
|
||||
@@ -267,6 +267,8 @@ es:
|
||||
newest_first: "Primero el más nuevo"
|
||||
navigation: Navegación
|
||||
next_comment: "Ir al siguiente comentario"
|
||||
toggle_search: "Abrir búsqueda"
|
||||
next_queue: "Próxima cola"
|
||||
oldest_first: "Primero el más antiguo"
|
||||
premod: pre-mod
|
||||
prev_comment: "Ir al comentario anterior"
|
||||
|
||||
Reference in new issue
Block a user