Skip to content

Commit

Permalink
Merge pull request #3 from YoYoGames/luke-test
Browse files Browse the repository at this point in the history
Replaced english files while preserving translations
  • Loading branch information
gurpreetsinghmatharoo authored Dec 1, 2023
2 parents 88e33d9 + 3a7eb53 commit 4d171ad
Show file tree
Hide file tree
Showing 609 changed files with 27,612 additions and 251 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Beta
on:
workflow_dispatch:
pull_request:
paths-ignore:
- '.github/workflows/**'
branches:
- develop

Expand Down Expand Up @@ -32,7 +34,7 @@ jobs:
token: ${{ secrets.GH_TOKEN }}
- name: Beta Builds
if: github.event.pull_request.base.ref == 'develop' || github.event_name == 'workflow_dispatch'
run: build_robohelp_gh.bat -beta %GITHUB_WORKSPACE%\output
run: build_robohelp_gh.bat %GITHUB_WORKSPACE%\output
shell: cmd
working-directory: Manual
- name: Upload robohelp zip file
Expand Down
50 changes: 28 additions & 22 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,32 @@ jobs:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}
persist-credentials: false
- name: Sync upstream changes
id: sync
uses: aormsby/[email protected]
with:
target_sync_branch: develop
# REQUIRED 'target_repo_token' exactly like this!
target_repo_token: ${{ secrets.GH_TOKEN }}
upstream_sync_branch: develop
upstream_sync_repo: YoYoGames/GameMaker-Manual
upstream_repo_access_token: ${{ secrets.GH_TOKEN }}
git_config_user: ksuchitra532
git_config_email: null
git_config_pull_rebase: true
- name: Sync upstream changes
id: sync-lts
uses: aormsby/[email protected]
- name: Merge from upstream
env:
UPSTREAM: YoYoGames/GameMaker-Manual
run: |
git config --global user.name "github-actions"
git config --global user.email "[email protected]"
git --version
# Add upstream remote and fetch
git remote add upstream "https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/${UPSTREAM}.git"
git remote -v
git fetch upstream
# Merge from upstream/develop with merge strategy to keep translation in case of conflicts
git merge -X ours upstream/develop
# this is dangerous but will essentially remove any files not staged in the merge
# this is useful since the merge strategy `-X ours` will not handle files where
# they have been deleted on only one branch
# Only use this you're sure that the failing merges fall under this category and are acceptable
# git diff --name-only --diff-filter=U | xargs git rm
git show-ref
- name: Push changes
uses: ad-m/github-push-action@master
with:
target_sync_branch: main-lts
# REQUIRED 'target_repo_token' exactly like this!
target_repo_token: ${{ secrets.GH_TOKEN }}
upstream_sync_branch: main-lts
upstream_sync_repo: YoYoGames/GameMaker-Manual
upstream_repo_access_token: ${{ secrets.GH_TOKEN }}
github_token: ${{ secrets.GH_TOKEN }}
branch: ${{ github.ref }}
41 changes: 41 additions & 0 deletions .github/workflows/trigger-all-localisation-builds.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Trigger-Localisation-Builds

on:
workflow_dispatch:
inputs:
Language:
description: "Select All languages to build"
required: false
type: choice
options:
- ALL
BUILD_TYPE:
description: "Select individual language to build"
required: true
type: choice
options:
- main
- lts
- build


jobs:

Trigger-Localisation-Builds:
name:
runs-on: ubuntu-22.04
strategy:
matrix:
language: [PT-BR, DE, ES, FR, IT, JA, KO, PL, RU, ZH]
steps:
- name: Invoke Localisation Workflows
if: ${{ github.event.inputs.Language }} == 'ALL'
uses: benc-uk/workflow-dispatch@v1
with:
workflow: ${{ github.event.inputs.BUILD_TYPE }}.yml
repo: YoYoGames/GameMaker-Manual-${{ matrix.language }}
token: ${{ secrets.GH_TOKEN }}
continue-on-error: false



2 changes: 1 addition & 1 deletion Manual/GMS2_Manual.rhpj
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?xml version="1.0" encoding="UTF-8"?><project version="2022.0.346"><title>GMS2 Manual</title><id>ed49fdaf-a158-4f0a-bdc8-7b5026ece5f2</id><layouts></layouts><preferences><language>en_UK</language><noInlineStyle>false</noInlineStyle><hideBookmarks>false</hideBookmarks><advancedHtmlHelpOptions>false</advancedHtmlHelpOptions><trackChanges>false</trackChanges><defaultCss>contents/assets/css/default.css</defaultCss><defaultWsf>settings/import/word/default.wsf</defaultWsf><defaultFsf>settings/import/fm/default.fsf</defaultFsf></preferences><links></links><scripts></scripts><authortabs></authortabs><outputtabs></outputtabs><content root="contents/"></content><toc root="toc"></toc><snippets root="contents/assets/snippets"></snippets><glossary root="glossary"></glossary><index root="index"></index><seealso root="seealso"></seealso><variable root="variable"></variable><condition root="condition"></condition><microcontent root="contents/microcontent"></microcontent></project>
<?xml version="1.0" encoding="UTF-8"?><project version="2022.0.0"><title>GMS2 Manual</title><id>ed49fdaf-a158-4f0a-bdc8-7b5026ece5f2</id><layouts></layouts><preferences><language>en_UK</language><noInlineStyle>false</noInlineStyle><hideBookmarks>false</hideBookmarks><advancedHtmlHelpOptions>false</advancedHtmlHelpOptions><trackChanges>false</trackChanges><defaultCss>contents/assets/css/default.css</defaultCss><defaultWsf>settings/import/word/default.wsf</defaultWsf><defaultFsf>settings/import/fm/default.fsf</defaultFsf></preferences><links></links><scripts></scripts><authortabs></authortabs><outputtabs></outputtabs><content root="contents/"></content><toc root="toc"></toc><snippets root="contents/assets/snippets"></snippets><glossary root="glossary"></glossary><index root="index"></index><seealso root="seealso"></seealso><variable root="variable"></variable><condition root="condition"></condition><microcontent root="contents/microcontent"></microcontent></project>
77 changes: 77 additions & 0 deletions Manual/GenerateKeyboardShortcutTableFromList.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
import csv
import re

shortcutList="./ManualShortcuts.csv"
table="./ManualShortcutsTable.htm"

# Replace the Mac characters using simple regexes
def replaceMacChars(string):
string = re.sub("⌘$", r"CMD", string)
string = re.sub("⌫$", r"Delete", string)
string = re.sub("⎋$", r"Escape", string)
string = re.sub("⌃$", r"CTRL", string)
string = re.sub("⇧$", r"SHIFT", string)
string = re.sub("⌥$", r"ALT", string)
string = re.sub("⇥$", r"Tab,", string)
string = re.sub("⌘([^,])", r"CMD+\1", string) # Command
string = re.sub("⌫([^,])", r"Delete+\1", string) # Delete
string = re.sub("⌃([^,])", r"CTRL+\1", string) # Control
string = re.sub("⇧([^,])", r"SHIFT+\1", string) # Shift
string = re.sub("⌥([^,])", r"ALT+\1", string) # Alt
string = re.sub("⇥([^,])", r"Tab+\1", string) # Tab
return string


previousSection = ""

# Is this the first table we're writing?
first = True

with open(shortcutList, encoding="utf-8") as csvfile:
with open(table, "w", encoding="utf-8") as tablefile:
shortcutReader = csv.reader(csvfile)

tablefile.write("<!DOCTYPE html>\n<html><head></head><body>")

for row in shortcutReader:
print(row)
name, winKeyCombo, macKeyCombo, section, description = row

# Insert <table> tag so we can copy-paste directly from the table
# (including table formatting!)
if section != previousSection:
if not first:
tablefile.write("</table>")

tablefile.write("<h2>" + section + "</h2>")
tablefile.write("<table><tr><th>Windows Key Binding</th><th>macOS Key Binding</th><th>Scope</th><th>Description</th></tr>\n")

tableRow = "<tr>\n"
#Ignore row[0] - name field

# Windows key combination
tableRow += "\t<td>"+winKeyCombo+"</td>\n"

# MacOS key combination
macKeyCombo = replaceMacChars(row[2])
tableRow += "\t<td>"+macKeyCombo+"</td>\n"

# Category/Scope/Section
previousSection = section
tableRow += "\t<td>"+section+"</td>\n"

# Description
if description:
tableRow += "\t<td>"+description+"</td>\n"
else:
tableRow += "\t<td>"+name+" ***</td>\n"

tableRow += "</tr>\n"
tablefile.write(tableRow)

first = False

# Close the last table tag too
tablefile.write("</table>\n")
tablefile.write("</body>\n")
tablefile.write("</html>\n")
Loading

0 comments on commit 4d171ad

Please sign in to comment.