Skip to content

Commit 785f266

Browse files
authored
Remove kotlin and add ts support (#5)
feat: remove kotlin and ts support
1 parent 1c4f426 commit 785f266

77 files changed

Lines changed: 30437 additions & 857 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.

.github/release-drafter.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name-template: 'v$RESOLVED_VERSION'
2+
tag-template: 'v$RESOLVED_VERSION'
3+
latest: 'true'
4+
5+
prerelease: true
6+
prerelease-identifier: 'alpha'
7+
categories:
8+
- title: '🚀 Features'
9+
labels:
10+
- 'feature'
11+
- 'enhancement'
12+
- title: '🐛 Bug Fixes'
13+
labels:
14+
- 'fix'
15+
- 'bugfix'
16+
- 'bug'
17+
autolabeler:
18+
- label: 'bug'
19+
branch:
20+
- '/fix\/.+/'
21+
title:
22+
- '/fix/i'
23+
- label: 'enhancement'
24+
branch:
25+
- '/feature\/.+/'
26+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
27+
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
28+
29+
template: |
30+
## Changes
31+
32+
$CHANGES

.github/workflows/ci-master.yml

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
# Release build pipeline, operates on `release_*` branches and creates releases
2+
3+
name: CI Release branch
4+
5+
on:
6+
push:
7+
branches: [ "dev" ] # trap each push to dev branch TODO SKA change back to dev
8+
paths: # but react only to changes in code or pipeline definition
9+
- src/**.*
10+
- .github/**.*
11+
12+
jobs:
13+
build:
14+
permissions:
15+
# write permission is required to create a github release
16+
contents: write
17+
# write permission is required for autolabeler
18+
# otherwise, read permission is required at least
19+
pull-requests: write
20+
21+
outputs:
22+
release_id: ${{ steps.create_release.outputs.id }}
23+
released_version: ${{ steps.release_version.outputs.version }}
24+
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
28+
runs-on: ubuntu-latest
29+
30+
steps:
31+
32+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 # checkout sources
33+
with:
34+
ref: ${{ github.ref }}
35+
fetch-depth: 0
36+
37+
- name: Resolve new release version
38+
id: release_version
39+
uses: lukashornych/semantic-calendar-version@bb0a07cf0ca71a0b2b4fed52114e28092e5cac81 #v1.2.0
40+
with:
41+
prefix: 'v'
42+
year_switch_mode: 'OnMinor'
43+
minor-identifier: '/feat(?:\\([^)]+\\))?:/'
44+
45+
- name: Setup Java JDK
46+
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0 setup JDK 17 for building
47+
with:
48+
java-version: 8
49+
distribution: 'temurin'
50+
cache: 'maven'
51+
server-id: ossrh
52+
server-username: MAVEN_USERNAME
53+
server-password: MAVEN_CENTRAL_TOKEN
54+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
55+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
56+
57+
- name: Build with Maven
58+
run: |
59+
export CURRENT_VERSION="${{ steps.release_version.outputs.version }}"
60+
export NEW_VERSION="$( echo ${CURRENT_VERSION} | sed 's/^v//')"
61+
mvn versions:set -DnewVersion=$NEW_VERSION
62+
mvn -T 1C -B -P release-sign-artifacts -Dmaven.test.skip=true deploy --file pom.xml
63+
env:
64+
EVITA_BUILD_VERSION: ${{ steps.release_version.outputs.version }}
65+
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
66+
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
67+
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
68+
69+
- name: Create distribution directory
70+
run: |
71+
mkdir -p ./dist
72+
cp LICENSE ./dist
73+
cp 'target/babylon-boot.jar' ./dist
74+
75+
- name: Create .zip of dist
76+
uses: thedoctor0/zip-release@b57d897cb5d60cb78b51a507f63fa184cfe35554 # v0.7.6
77+
with:
78+
type: 'zip'
79+
filename: 'dist.zip'
80+
path: './dist'
81+
82+
- name: Create .tar.gz of dist
83+
uses: thedoctor0/zip-release@b57d897cb5d60cb78b51a507f63fa184cfe35554 # v0.7.6
84+
with:
85+
type: 'tar'
86+
filename: 'dist.tar.gz'
87+
path: './dist'
88+
89+
- name: Create release
90+
id: create_release
91+
uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5 # v6.1.0
92+
with:
93+
version: ${{ steps.release_version.outputs.version }}
94+
publish: true
95+
96+
- name: Upload dist.zip to release
97+
uses: actions/upload-release-asset@64e5e85fc528f162d7ba7ce2d15a3bb67efb3d80 # v1.0.1
98+
if: success()
99+
with:
100+
upload_url: ${{ steps.create_release.outputs.upload_url }}
101+
asset_path: ./dist.zip
102+
asset_name: Dist (zip)
103+
asset_content_type: application/zip
104+
105+
- name: Upload dist.tar.gz to release
106+
uses: actions/upload-release-asset@64e5e85fc528f162d7ba7ce2d15a3bb67efb3d80 # v1.0.1
107+
if: success()
108+
with:
109+
upload_url: ${{ steps.create_release.outputs.upload_url }}
110+
asset_path: ./dist.tar.gz
111+
asset_name: Dist (tar.gz)
112+
asset_content_type: application/gzip
113+
114+
- name: Upload babylon server artifact # upload `babylon-boot.jar` for `docker-latest.yml` to deploy to DockerHub
115+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
116+
if: success()
117+
with:
118+
name: babylon-boot.jar
119+
path: 'target/babylon-boot.jar'
File renamed without changes.

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# Babylon
22

3-
## Tool to automate Java property file translation.
3+
## Tool to automate translation files.
44

55
### Description and usage
66

7-
Babylon is a tool to gather messages, and their translations from property files. It performs a round-trip consisting of
7+
Babylon is a tool to gather messages, and their translations from translation files. It performs a round-trip consisting of
88
two phases: *export* phase and *import* phase.
99

1010
In the export phase the messages are written to a [Google Sheets](https://www.google.com/sheets/about/) spreadsheet.
1111
A translator will then fill in the missing translations.
1212

1313
In the import phase, the spreadsheet (with the missing translations filled out by a translator) is examined, and the
14-
newly translated messages are used to update the respective translation property files. Also, the state of the translation,
14+
newly translated messages are used to update the respective translation files. Also, the state of the translation,
1515
*snapshot*, is written out to a disk in the form of JSON file.
1616

1717
Babylon can be run as a Maven plugin or as a standalone console application.
@@ -25,6 +25,8 @@ To run Babylon:
2525
- A Json configuration file must exist (see the "Configuration" section).
2626
- A Google Sheets spreadsheet must exist (empty for the export phase).
2727

28+
Currently only supported file types are **.properties** and **.ts**
29+
2830
### Google Cloud user credentials
2931

3032
You need a Google Cloud project with Sheets API enabled. Also, you need to download the `credentials.json` client
@@ -122,7 +124,7 @@ mvn babylon:import -Dconfig.file=test-config.json -Dgoogle.sheet.id=1xhnBAOpy8-9
122124

123125
### Running Babylon as a console application
124126

125-
Application needs the following arguments: 1.action 2.config.json 3.google sheet id
127+
Application needs the following arguments: 1.action 2.config.json 3.google sheet id (4. optional combineSheets)
126128

127129
1. expected action (export, import)
128130
* `export` - takes all properties files specified in configuration file and export their properties into specified the Google spreadsheet. Each property
@@ -132,10 +134,13 @@ Application needs the following arguments: 1.action 2.config.json 3.google sheet
132134
properties file (are present only in concrete mutation properties file) is placed at the end of the target mutation file.
133135
2. path to translator-config.json file. This file serves as database for translation process.
134136
3. ID of the Google spreadsheet (e.g. 1xhnBAOpy8-9KWhl8NP0ZIy6mhlgXKnKcLJwKcIeyjPc)
137+
4. **Optional** boolean value whether export should be placed into only one sheet (only usable for debugging translations)
135138

136139
Command line examples:
137140

138141
``` shell
139142
java -jar babylon-1.0-SNAPSHOT.jar export test-config.json 1xhnBAOpy8-9KWhl8NP0ZIy6mhlgXKnKcLJwKcIeyjPc
140143
java -jar babylon-1.0-SNAPSHOT.jar import test-config.json 1xhnBAOpy8-9KWhl8NP0ZIy6mhlgXKnKcLJwKcIeyjPc
141144
```
145+
146+

0 commit comments

Comments
 (0)