Skip to content

Commit

Permalink
Add missing Apache 2.0 headers
Browse files Browse the repository at this point in the history
  • Loading branch information
wadimw committed Sep 25, 2024
1 parent 9417c25 commit 3e3f85a
Show file tree
Hide file tree
Showing 39 changed files with 663 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Copyright © 2024, Box, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licensefs/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import type { Plugin } from "loctool";
import PendoXliffFileType from "./loctool/PendoXliffFileType";

Expand Down
17 changes: 17 additions & 0 deletions src/loctool/PendoXliffFile.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Copyright © 2024, Box, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licensefs/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import type { File, ResourceString, TranslationSet } from "loctool";
import fs from "node:fs";
import { backconvert, convert } from "../markdown/convert";
Expand Down
17 changes: 17 additions & 0 deletions src/loctool/PendoXliffFileType.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Copyright © 2024, Box, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licensefs/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import type { FileType, Project, API, TranslationSet, ResourceString } from "loctool";
import path from "node:path";
import PendoXliffFile, { type TranslationUnit } from "./PendoXliffFile";
Expand Down
17 changes: 17 additions & 0 deletions src/loctool/__tests__/PendoXliffFile.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Copyright © 2024, Box, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licensefs/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import type { TranslationSet } from "loctool";
import PendoXliffFile from "../PendoXliffFile";
import fs from "node:fs";
Expand Down
17 changes: 17 additions & 0 deletions src/loctool/types/loctool/API.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Copyright © 2024, Box, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licensefs/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
* See the License for the specific language governing permissions and
* limitations under the License.
*/

// per https://github.com/iLib-js/loctool/blob/201b56fc5a524ae578b55f582ff9b309010b4c3c/docs/Plugins.md#api-class
declare module "loctool" {
/** the resource is a simple string */
Expand Down
17 changes: 17 additions & 0 deletions src/loctool/types/loctool/File.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Copyright © 2024, Box, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licensefs/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
* See the License for the specific language governing permissions and
* limitations under the License.
*/

// per https://github.com/iLib-js/loctool/blob/201b56fc5a524ae578b55f582ff9b309010b4c3c/docs/Plugins.md#file-class
declare module "loctool" {
export interface File {
Expand Down
17 changes: 17 additions & 0 deletions src/loctool/types/loctool/FileType.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Copyright © 2024, Box, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licensefs/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
* See the License for the specific language governing permissions and
* limitations under the License.
*/

// per https://github.com/iLib-js/loctool/blob/201b56fc5a524ae578b55f582ff9b309010b4c3c/docs/Plugins.md#filetype-class
declare module "loctool" {
export interface FileType {
Expand Down
17 changes: 17 additions & 0 deletions src/loctool/types/loctool/Plugin.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Copyright © 2024, Box, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licensefs/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
* See the License for the specific language governing permissions and
* limitations under the License.
*/

// loctool expects that plugin returns a class which it then instantiates on its own
// using specifically this signature;
// see https://github.com/iLib-js/loctool/blob/285401359f923c1be11e7329b549ed11b4099637/lib/CustomProject.js#L108
Expand Down
17 changes: 17 additions & 0 deletions src/loctool/types/loctool/Project.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Copyright © 2024, Box, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licensefs/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
* See the License for the specific language governing permissions and
* limitations under the License.
*/

// per https://github.com/iLib-js/loctool/blob/201b56fc5a524ae578b55f582ff9b309010b4c3c/docs/Plugins.md#the-project-class
declare module "loctool" {
export class Project {
Expand Down
17 changes: 17 additions & 0 deletions src/loctool/types/loctool/Resource.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Copyright © 2024, Box, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licensefs/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
* See the License for the specific language governing permissions and
* limitations under the License.
*/

// per https://github.com/iLib-js/loctool/blob/201b56fc5a524ae578b55f582ff9b309010b4c3c/docs/Plugins.md#resource
declare module "loctool" {
type ResourceProps = {
Expand Down
17 changes: 17 additions & 0 deletions src/loctool/types/loctool/ResourceArray.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Copyright © 2024, Box, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licensefs/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
* See the License for the specific language governing permissions and
* limitations under the License.
*/

// per https://github.com/iLib-js/loctool/blob/201b56fc5a524ae578b55f582ff9b309010b4c3c/docs/Plugins.md#resourcearray
declare module "loctool" {
export class ResourceArray extends Resource {
Expand Down
17 changes: 17 additions & 0 deletions src/loctool/types/loctool/ResourcePlural.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Copyright © 2024, Box, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licensefs/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
* See the License for the specific language governing permissions and
* limitations under the License.
*/

// per https://github.com/iLib-js/loctool/blob/201b56fc5a524ae578b55f582ff9b309010b4c3c/docs/Plugins.md#resourceplural
declare module "loctool" {
type PluralCategoryZero = "zero";
Expand Down
17 changes: 17 additions & 0 deletions src/loctool/types/loctool/ResourceString.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Copyright © 2024, Box, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licensefs/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
* See the License for the specific language governing permissions and
* limitations under the License.
*/

// per https://github.com/iLib-js/loctool/blob/201b56fc5a524ae578b55f582ff9b309010b4c3c/docs/Plugins.md#resourcestring
declare module "loctool" {
export class ResourceString extends Resource {
Expand Down
17 changes: 17 additions & 0 deletions src/loctool/types/loctool/TranslationSet.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Copyright © 2024, Box, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licensefs/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
* See the License for the specific language governing permissions and
* limitations under the License.
*/

// per https://github.com/iLib-js/loctool/blob/201b56fc5a524ae578b55f582ff9b309010b4c3c/docs/Plugins.md#translationset
declare module "loctool" {
type Criteria = unknown;
Expand Down
17 changes: 17 additions & 0 deletions src/markdown/ast-transformer/color/__tests__/color.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Copyright © 2024, Box, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licensefs/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import { fromColorNodes, toColorNodes } from "../color";
import u from "unist-builder";

Expand Down
17 changes: 17 additions & 0 deletions src/markdown/ast-transformer/color/color.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Copyright © 2024, Box, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licensefs/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import visit from "unist-util-visit";
import { htmlRegex } from "../../string-transformer/color";
import structuredClone from "@ungap/structured-clone";
Expand Down
17 changes: 17 additions & 0 deletions src/markdown/ast-transformer/color/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Copyright © 2024, Box, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licensefs/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import type { Color } from "./color";
import { fromColorNodes, toColorNodes } from "./color";

Expand Down
17 changes: 17 additions & 0 deletions src/markdown/ast-transformer/component/__tests__/escape.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Copyright © 2024, Box, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licensefs/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import u from "unist-builder";
import { fromComponents, toComponents } from "../escape";

Expand Down
17 changes: 17 additions & 0 deletions src/markdown/ast-transformer/component/__tests__/mapping.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Copyright © 2024, Box, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licensefs/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import u from "unist-builder";
import { mapComponentDataToNode, mapNodeToComponentData } from "../mapping";
import type { ComponentData } from "..";
Expand Down
Loading

0 comments on commit 3e3f85a

Please sign in to comment.