Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F152978562
D31882.id94897.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D31882.id94897.diff
View Options
diff --git a/tools/translate.sh b/tools/translate.sh
--- a/tools/translate.sh
+++ b/tools/translate.sh
@@ -23,6 +23,32 @@
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#########################################################
+# Fix arrays like tags: and trademarks: by #
+# removing single quotes enclosing square brackets #
+# S1: file to fix #
+#########################################################
+fixup_lists()
+{
+ sed -i '' -E -e "s/(tags|trademarks).*'\[(.*)]'/\1: [\2]/g" "${1}"
+}
+
+#########################################################
+# Fix includes. In most cases we want to include the #
+# master (aka English) version of the includes #
+# S1: file to fix #
+# $2: language #
+#########################################################
+fixup_article_includes()
+{
+ # Replace ...shared/en/... with shared/$LANGUAGE
+ # content/en with content/$LANGUAGE in includes
+ sed -i '' -E -e "s,include::(.*)shared/en/,include::\1shared/${2}/," \
+ -e "s,\{include-path\}(contrib*),content/en/articles/contributors/\1," \
+ -e "s,include-path: content/en/,include-path: content/${2}/," \
+ -e "s,(include::.*)contrib-develinmemoriam(.*),include::{include-path}contrib-develinmemoriam\2," \
+ "${1}"
+}
if [ "$1" = "" ] || [ "$2" = "" ]; then
echo "Need to inform which component and|or language."
@@ -73,6 +99,11 @@
--localized "$adoc_lang" \
--localized-charset "UTF-8" \
--keep "$KEEP"
-
+
+ fixup_lists "${adoc_lang}"
+ r=$(echo "${adoc_lang}" | grep '/articles/')
+ if [ ! -z "${r}" ]; then
+ fixup_article_includes "${adoc_lang}" "${LANGUAGE}"
+ fi
done
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 19, 11:01 AM (13 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31763798
Default Alt Text
D31882.id94897.diff (1 KB)
Attached To
Mode
D31882: [docs] tools/translate.sh: Add fixups
Attached
Detach File
Event Timeline
Log In to Comment