Sort PO files to avoid random reorder
Changes like https://review.openstack.org/#/c/185848/1/horizon/locale/ca/LC_MESSAGES/djangojs.po just reordered entries with no content change. Pass --sort-output to msgattrib to filter the entries in alphabetical order so that any rearrangements of the source files will not have an effect on the order of the entries. Change-Id: I2d9c91f3d1fbcf61ae21521758836793742389ed
This commit is contained in:
parent
0f658ca60e
commit
7166dc85d8
@ -397,7 +397,8 @@ function compress_po_files {
|
|||||||
local directory=$1
|
local directory=$1
|
||||||
|
|
||||||
for i in `find $directory -name *.po `; do
|
for i in `find $directory -name *.po `; do
|
||||||
msgattrib --translated --no-location "$i" --output="${i}.tmp"
|
msgattrib --translated --no-location --sort-output "$i" \
|
||||||
|
--output="${i}.tmp"
|
||||||
mv "${i}.tmp" "$i"
|
mv "${i}.tmp" "$i"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
@ -417,7 +418,8 @@ function compress_manual_po_files {
|
|||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
msgattrib --translated --no-location "$i" --output="${i}.tmp"
|
msgattrib --translated --no-location --sort-output "$i" \
|
||||||
|
--output="${i}.tmp"
|
||||||
mv "${i}.tmp" "$i"
|
mv "${i}.tmp" "$i"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
@ -435,7 +437,8 @@ function compress_non_en_po_files {
|
|||||||
if [[ $i =~ "/locale/en/LC_MESSAGES/" ]] ; then
|
if [[ $i =~ "/locale/en/LC_MESSAGES/" ]] ; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
msgattrib --translated --no-location "$i" --output="${i}.tmp"
|
msgattrib --translated --no-location --sort-output "$i" \
|
||||||
|
--output="${i}.tmp"
|
||||||
mv "${i}.tmp" "$i"
|
mv "${i}.tmp" "$i"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user