This repository has been archived by the owner on Dec 18, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 255
Script Overhaul #421
Draft
emabrey
wants to merge
4
commits into
master
Choose a base branch
from
script-overhaul
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Script Overhaul #421
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env bash | ||
#!/bin/sh | ||
|
||
conan --version | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#!/bin/sh | ||
|
||
for i in *.po; do | ||
sed -i '/^Project/d' $i | ||
done | ||
done |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/sh | ||
|
||
# Run this script on a directory to handle PO files with no id | ||
DIRNAME=$(dirname "$0") | ||
|
||
if [ $# -eq 0 ]; then | ||
set -- "$DIRNAME/../" | ||
fi | ||
|
||
for dir in "$@" | ||
do | ||
for po_file in "${dir}"/*.po; do | ||
sed -i '/^Project/d' "$po_file" | ||
done | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import polib | ||
import os | ||
|
||
localedir = './' | ||
localedir = '../' | ||
count_seen = 0 | ||
count_modified = 0 | ||
|
||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/sh | ||
|
||
# Report how complete each translation catalog is | ||
|
||
# How many messages in total? | ||
total=$(grep -c '^msgid' "../tenacity.pot") | ||
|
||
|
||
declare -i badlines | ||
for po_file in ../*.po; do | ||
# If there are errors from msgcmp, then the last line on standard error | ||
# contains a count of problematic messages; else it won't match the | ||
# pattern in awk, so assume no errors | ||
errors=$(msgcmp "$po_file" "../tenacity.pot" 2>&1 | awk '/msgcmp: found [0-9]* fatal error/ { nn = $3 } END {print 0+nn}') | ||
complete=$((total-errors)) | ||
|
||
# detect whether this sequence occurs in any .po file. It will break msgfmt on Windows. | ||
badlines=$(grep -F -c '#~|' "${po_file}") | ||
|
||
echo "$po_file: completed $complete of $total ($((complete*100/total))%); Windows Incompatible Lines: $badlines" | ||
done | sort -n -t , -k3 | ||
|
||
exit 0 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/sh | ||
# Run this script with /locale/script/ as the current directory | ||
set -o errexit | ||
|
||
DIRNAME=$(dirname "$0") | ||
|
||
echo ";; Recreating tenacity.pot using .h, .cpp and .mm files" | ||
for path in "$DIRNAME/../modules/mod-*" "$DIRNAME/../libraries/lib-*" "$DIRNAME/../include" "$DIRNAME/../src" ; do | ||
find "$path" -name \*.h -o -name \*.cpp -o -name \*.mm | ||
done | LANG=c sort | \ | ||
sed -E 's/\.\.\///g' |\ | ||
xargs xgettext \ | ||
--no-wrap \ | ||
--default-domain=tenacity \ | ||
--directory="$DIRNAME/../.." \ | ||
--keyword=_ --keyword=XO --keyword=XC:1,2c --keyword=XXO --keyword=XXC:1,2c --keyword=XP:1,2 --keyword=XPC:1,2,4c \ | ||
--add-comments=" i18n" \ | ||
--add-location=file \ | ||
--copyright-holder='Tenacity Contributors' \ | ||
--package-name="tenacity" \ | ||
--package-version='3.0.4' \ | ||
--msgid-bugs-address="[email protected]" \ | ||
--add-location=file -L C -o "$DIRNAME/../tenacity.pot" | ||
|
||
echo ";; Adding nyquist files to tenacity.pot" | ||
for path in "$DIRNAME/../../plug-ins/"* ; do find "$path" -name \*.ny -not -name rms.ny; done | LANG=c sort | \ | ||
sed -E 's/\.\.\///g' |\ | ||
xargs xgettext \ | ||
--no-wrap \ | ||
--default-domain=tenacity \ | ||
--directory="$DIRNAME/../.." \ | ||
--keyword=_ --keyword=_C:1,2c --keyword=ngettext:1,2 --keyword=ngettextc:1,2,4c \ | ||
--add-comments=" i18n" \ | ||
--add-location=file \ | ||
--copyright-holder='Tenacity Contributors' \ | ||
--package-name="tenacity" \ | ||
--package-version='3.0.4' \ | ||
--msgid-bugs-address="[email protected]" \ | ||
--add-location=file -L Lisp -j -o "$DIRNAME/../tenacity.pot" | ||
|
||
echo "" | ||
echo ";; POT file generated" | ||
echo "" | ||
|
||
head -n 11 "$DIRNAME/../tenacity.pot" | tail -n 3 | ||
wc -l "$DIRNAME/../tenacity.pot" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See lines 3-8.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried this syntax on a few of my systems and it sometimes does not work.
Also, collapsed it to
$DIRNAME
in my patch