Skip to content

Commit f144261

Browse files
feat(UniverSheet): add ja-JP locals (#847)
* chore: update univer to v0.13.0 * chore: 更新文件编码 * chore: bump version 9.0.7 --------- Co-authored-by: zhaijunlei <276318515@qq.com>
1 parent 54fc509 commit f144261

120 files changed

Lines changed: 836 additions & 345 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/components/BootstrapBlazor.UniverSheet/BootstrapBlazor.UniverSheet.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup>
4-
<Version>9.0.6</Version>
4+
<Version>9.0.7</Version>
55
</PropertyGroup>
66

77
<PropertyGroup>

src/components/BootstrapBlazor.UniverSheet/Components/UniverSheet.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@namespace BootstrapBlazor.Components
1+
@namespace BootstrapBlazor.Components
22
@inherits BootstrapModuleComponentBase
33
@attribute [JSModuleAutoLoader("./_content/BootstrapBlazor.UniverSheet/Components/UniverSheet.razor.js", JSObjectReference = true)]
44

src/components/BootstrapBlazor.UniverSheet/Components/UniverSheet.razor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
1+
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33
// Website: https://www.blazor.zone or https://argozhang.github.io/
44

src/components/BootstrapBlazor.UniverSheet/Components/UniverSheet.razor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Data from '../../BootstrapBlazor/modules/data.js'
1+
import Data from '../../BootstrapBlazor/modules/data.js'
22
import { isFunction } from '../../BootstrapBlazor/modules/utility.js'
33
import { createUniverSheetAsync } from '../univer.js'
44

src/components/BootstrapBlazor.UniverSheet/Components/UniverSheetData.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
1+
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33
// Website: https://www.blazor.zone or https://argozhang.github.io/
44

src/components/BootstrapBlazor.UniverSheet/wwwroot/data-service.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { isFunction } from '../BootstrapBlazor/modules/utility.js'
1+
import { isFunction } from '../BootstrapBlazor/modules/utility.js'
22

33
export default class DataService {
44
static name = 'DataService';

src/components/BootstrapBlazor.UniverSheet/wwwroot/plugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import DataService from './data-service.js'
1+
import DataService from './data-service.js'
22

33
const { Plugin, Injector, setDependencies } = UniverCore;
44

src/components/BootstrapBlazor.UniverSheet/wwwroot/univer.js

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,17 @@ const loadAssets = async lang => {
1010
await addScript('./_content/BootstrapBlazor.UniverSheet/univer/univerjs.preset-sheets-drawing/index.umd.min.js');
1111
await addScript('./_content/BootstrapBlazor.UniverSheet/univer/univerjs.sheets-zen-editor/index.umd.min.js');
1212
await addScript('./_content/BootstrapBlazor.UniverSheet/univer/univerjs.preset-sheets-data-validation/index.umd.min.js');
13+
await addScript('./_content/BootstrapBlazor.UniverSheet/univer/univerjs.preset-sheets-thread-comment/index.umd.min.js');
14+
await addScript('./_content/BootstrapBlazor.UniverSheet/univer/univerjs.preset-sheets-hyper-link/index.umd.min.js');
15+
await addScript('./_content/BootstrapBlazor.UniverSheet/univer/univerjs.preset-sheets-filter/index.umd.min.js');
16+
await addScript('./_content/BootstrapBlazor.UniverSheet/univer/univerjs.preset-sheets-conditional-formatting/index.umd.min.js');
1317
await addScript('./_content/BootstrapBlazor.UniverSheet/univer/univerjs.preset-sheets-advanced/index.umd.min.js');
1418

1519
await addScript(`./_content/BootstrapBlazor.UniverSheet/univer/univerjs.preset-sheets-core/locales/${lang}.js`);
1620
await addScript(`./_content/BootstrapBlazor.UniverSheet/univer/univerjs.preset-sheets-drawing/locales/${lang}.js`);
1721
await addScript(`./_content/BootstrapBlazor.UniverSheet/univer/univerjs.sheets-zen-editor/locales/${lang}.js`);
1822
await addScript(`./_content/BootstrapBlazor.UniverSheet/univer/univerjs.preset-sheets-data-validation/locales/${lang}.js`);
23+
await addScript(`./_content/BootstrapBlazor.UniverSheet/univer/univerjs.preset-sheets-thread-comment/locales/${lang}.js`);
1924
await addScript(`./_content/BootstrapBlazor.UniverSheet/univer/univerjs.preset-sheets-advanced/locales/${lang}.js`);
2025

2126
await addLink('./_content/BootstrapBlazor.UniverSheet/univer/univer-sheet.bundle.css');
@@ -24,36 +29,53 @@ const loadAssets = async lang => {
2429
export async function createUniverSheetAsync(sheet) {
2530
sheet.lang = sheet.lang ?? 'en-US';
2631
await loadAssets(sheet.lang);
27-
2832
const { el } = sheet;
2933
const { LocaleType, merge } = UniverCore;
3034
const { createUniver } = UniverPresets;
3135
const { UniverSheetsCorePreset } = UniverPresetSheetsCore;
3236
const { UniverSheetsDrawingPreset } = UniverPresetSheetsDrawing;
3337
const { UniverSheetsAdvancedPreset } = UniverPresetSheetsAdvanced;
34-
const { UniverSheetsZenEditorPlugin } = UniverSheetsZenEditor
35-
const { UniverSheetsDataValidationPlugin } = UniverSheetsDataValidation
36-
const { UniverSheetsDataValidationUIPlugin } = UniverSheetsDataValidationUi
38+
const { UniverSheetsZenEditorPlugin } = UniverSheetsZenEditor;
39+
const { UniverSheetsThreadCommentPreset } = UniverPresetSheetsThreadComment;
40+
const { UniverSheetsDataValidationPreset } = UniverPresetSheetsDataValidation;
3741

3842
const lang = sheet.lang.replace('-', '')
3943
const langStr = lang.charAt(0).toUpperCase() + lang.slice(1)
4044
const options = {
4145
theme: UniverDesign[sheet.theme] ?? UniverDesign.defaultTheme, //'defaultTheme' | greenTheme
46+
darkMode: sheet.darkMode ?? false, // false | true
4247
locale: lang,
4348
locales: {
4449
[lang]: merge(
4550
{},
4651
window[`UniverPresetSheetsCore${langStr}`],
4752
window[`UniverPresetSheetsDrawing${langStr}`],
4853
window[`UniverSheetsZenEditor${langStr}`],
49-
window[`UniverSheetsDataValidationUi${langStr}`],
54+
window[`UniverPresetSheetsDataValidation${langStr}`],
55+
window[`UniverPresetSheetsThreadComment${langStr}`],
5056
window[`UniverPresetSheetsAdvanced${langStr}`],
5157
),
5258
},
59+
presets: [
60+
UniverSheetsCorePreset({
61+
container: el,
62+
ribbonType: sheet.ribbonType ?? 'simple', // default | classic | simple
63+
menu: {
64+
'sheet.menu.print': {
65+
hidden: true,
66+
},
67+
'sheets-exchange-client.operation.exchange': {
68+
hidden: true,
69+
},
70+
},
71+
}),
72+
UniverSheetsDrawingPreset(),
73+
UniverSheetsThreadCommentPreset(),
74+
UniverSheetsDataValidationPreset(),
75+
UniverSheetsAdvancedPreset(),
76+
],
5377
plugins: [
5478
UniverSheetsZenEditorPlugin,
55-
UniverSheetsDataValidationPlugin,
56-
UniverSheetsDataValidationUIPlugin,
5779
]
5880
};
5981
const plugins = sheet.plugins ?? {
@@ -65,16 +87,7 @@ export async function createUniverSheetAsync(sheet) {
6587
options.plugins.push(plugin);
6688
}
6789

68-
const { univer, univerAPI } = createUniver({
69-
presets: [
70-
UniverSheetsCorePreset({
71-
container: el
72-
}),
73-
UniverSheetsDrawingPreset(),
74-
UniverSheetsAdvancedPreset()
75-
],
76-
...options
77-
});
90+
const { univer, univerAPI } = createUniver(options);
7891

7992
const { workbookData } = sheet.data || {};
8093
if (workbookData) {

src/components/BootstrapBlazor.UniverSheet/wwwroot/univer/univer-sheet.bundle.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
@import 'univerjs.preset-sheets-drawing/index.css';
33
@import 'univerjs.sheets-zen-editor/index.css';
44
@import 'univerjs.preset-sheets-data-validation/index.css';
5+
@import 'univerjs.preset-sheets-thread-comment/index.css';
56
@import 'univerjs.preset-sheets-advanced/index.css';
67

78
.bb-univer-sheet {

src/components/BootstrapBlazor.UniverSheet/wwwroot/univer/univerjs-pro.sheets-print/facade.umd.min.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)