Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Language Configuration command to settings #32

Merged
merged 2 commits into from
Apr 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions oniro-ide-extension/src/browser/menus/localization-menu.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { MenuContribution, MenuModelRegistry } from "@theia/core";
import { CommonMenus, CommonCommands } from '@theia/core/lib/browser';
import { injectable } from "@theia/core/shared/inversify";

@injectable()
export class LocalizationMenuContribution implements MenuContribution {
registerMenus(registry: MenuModelRegistry): void {
registry.registerMenuAction(CommonMenus.SETTINGS__THEME, {
commandId: CommonCommands.CONFIGURE_DISPLAY_LANGUAGE.id,
order: 'z'
});
}
}
14 changes: 0 additions & 14 deletions oniro-ide-extension/src/browser/oniro-ide-contribution.ts

This file was deleted.

9 changes: 2 additions & 7 deletions oniro-ide-extension/src/browser/oniro-ide-frontend-module.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
/**
* Generated using theia-extension-generator
*/
import { OniroIdeCommandContribution, OniroIdeMenuContribution } from './oniro-ide-contribution';
import { CommandContribution, MenuContribution } from '@theia/core/lib/common';
import { ContainerModule } from '@theia/core/shared/inversify';
import { ProjectMenuContribution } from './menus/project-menu';
import { ProjectCommandContribution } from './commands/project-commands';
import { LocalizationMenuContribution } from './menus/localization-menu';

export default new ContainerModule(bind => {
// add your contribution bindings here
bind(CommandContribution).to(OniroIdeCommandContribution);
bind(MenuContribution).to(OniroIdeMenuContribution);

bind(CommandContribution).to(ProjectCommandContribution).inSingletonScope();
bind(MenuContribution).to(ProjectMenuContribution).inSingletonScope();
bind(MenuContribution).to(LocalizationMenuContribution).inSingletonScope();
});