Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addstring.py, tool to add new string to language file in easy way #2687

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

unxed
Copy link
Contributor

@unxed unxed commented Feb 25, 2025

No description provided.

…lang.templ.m4.

This change makes it easier for newbies to decide.
For any dialog displayed it prints to stderr id string of last message used for dialog creation.
You can add your strings for this dialog just after that one.
@elfmz
Copy link
Owner

elfmz commented Mar 2, 2025

better do it without that changes in main sources, why needed them?

@unxed
Copy link
Contributor Author

unxed commented Mar 2, 2025

better do it without that changes in main sources

But how?

@elfmz
Copy link
Owner

elfmz commented Mar 2, 2025

Я про изменения в С++ коде, я если честно не понял зачем они. Питоновский скрипт (кстати почему их два одинаковых?) же делает чтото типа этого?:

#!/bin/sh

if [ "$1" = '' ]; then
		echo Please specify path of farlang.templ.m4
		exit 1
fi

echo -n "ID: "
read -r ID

echo -n "Russian: "
read -r RUS

echo -n "English: "
read -r ENG

sed -i "/#Must be the last/ i $ID \\
\"$RUS\" \\
\"$ENG\" \\
upd:\"$ENG\" \\
upd:\"$ENG\" \\
upd:\"$ENG\" \\
upd:\"$ENG\" \\
upd:\"$ENG\" \\
upd:\"$RUS\" \\
upd:\"$RUS\" \\
$LF" $1

@unxed
Copy link
Contributor Author

unxed commented Mar 2, 2025

Прочитал невнимательно.

Да, он вставляет строчки в конец файла переводов, чтоб не копипастить кучу раз русский и английский. А изменения в cpp — чтоб легко искать, где начинаются и кончаются в коде строчки, относящиеся к конкретному диалогу, чтобы сразу переносить добавленное в логичное место.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants