mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-13 04:09:27 +00:00
Translating Arduino-IDE using Theia's nls API (#545)
This commit is contained in:
@@ -1,13 +1,22 @@
|
||||
import * as React from 'react';
|
||||
import { NotificationComponent } from './notification-component';
|
||||
import { NotificationCenterComponent as TheiaNotificationCenterComponent } from '@theia/messages/lib/browser/notification-center-component';
|
||||
import { nls } from '@theia/core/lib/browser/nls';
|
||||
|
||||
const PerfectScrollbar = require('react-perfect-scrollbar');
|
||||
|
||||
export class NotificationCenterComponent extends TheiaNotificationCenterComponent {
|
||||
render(): React.ReactNode {
|
||||
const empty = this.state.notifications.length === 0;
|
||||
const title = empty ? 'NO NEW NOTIFICATIONS' : 'NOTIFICATIONS';
|
||||
const title = empty
|
||||
? nls.localize(
|
||||
'vscode/notificationsCenter/notificationsEmpty',
|
||||
'NO NEW NOTIFICATIONS'
|
||||
)
|
||||
: nls.localize(
|
||||
'vscode/notificationsCenter/notifications',
|
||||
'NOTIFICATIONS'
|
||||
);
|
||||
return (
|
||||
<div
|
||||
className={`theia-notifications-container theia-notification-center ${
|
||||
@@ -20,12 +29,18 @@ export class NotificationCenterComponent extends TheiaNotificationCenterComponen
|
||||
<ul className="theia-notification-actions">
|
||||
<li
|
||||
className="collapse"
|
||||
title="Hide Notification Center"
|
||||
title={nls.localize(
|
||||
'vscode/notificationsStatus/hideNotifications',
|
||||
'Hide Notification Center'
|
||||
)}
|
||||
onClick={this.onHide}
|
||||
/>
|
||||
<li
|
||||
className="clear-all"
|
||||
title="Clear All"
|
||||
title={nls.localize(
|
||||
'vscode/notificationsCommands/clearAllNotifications',
|
||||
'Clear All'
|
||||
)}
|
||||
onClick={this.onClearAll}
|
||||
/>
|
||||
</ul>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import * as React from 'react';
|
||||
import { NotificationComponent as TheiaNotificationComponent } from '@theia/messages/lib/browser/notification-component';
|
||||
import { nls } from '@theia/core/lib/browser/nls';
|
||||
|
||||
export class NotificationComponent extends TheiaNotificationComponent {
|
||||
render(): React.ReactNode {
|
||||
@@ -26,7 +27,11 @@ export class NotificationComponent extends TheiaNotificationComponent {
|
||||
{expandable && (
|
||||
<li
|
||||
className={collapsed ? 'expand' : 'collapse'}
|
||||
title={collapsed ? 'Expand' : 'Collapse'}
|
||||
title={
|
||||
collapsed
|
||||
? nls.localize('theia/messages/expand', 'Expand')
|
||||
: nls.localize('theia/messages/collapse', 'Collapse')
|
||||
}
|
||||
data-message-id={messageId}
|
||||
onClick={this.onToggleExpansion}
|
||||
/>
|
||||
@@ -34,7 +39,7 @@ export class NotificationComponent extends TheiaNotificationComponent {
|
||||
{!this.isProgress && (
|
||||
<li
|
||||
className="clear"
|
||||
title="Clear"
|
||||
title={nls.localize('vscode/abstractTree/clear', 'Clear')}
|
||||
data-message-id={messageId}
|
||||
onClick={this.onClear}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user