Skip to contentSkip to conversation

do not hardcode grub.mo in grub-install_header

PATCH New Andrey Borzenkov 1 participant 1 message Apr 5, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 do not hardcode grub.mo in grub-install_header

TEXTDOMAIN is set to @PACKAGE@ everywhere, use the same instead of hardcoding "grub.mo".

---
 ChangeLog                | 5 +++++
 util/grub-install_header | 8 ++++----
 2 files changed, 9 insertions(+), 4 deletions(-)
ChangeLog +5 -0
index 41370a1..e1985f8 100644
@@ -1,3 +1,8 @@
+2013-04-05  Andrey Borzenkov <[email protected]>
+
+	* util/grub-install_header: Use @PACKAGE@ in message catalog name
+	 instead of hardcoding grub.mo.
+
 2013-04-05  Vladimir Serbinenko  <[email protected]>
 
 	* util/grub-mkfont.c: Prefer enum to #define.
util/grub-install_header +4 -4
index 7c2c0a5..69aac46 100644
@@ -82,16 +82,16 @@ grub_install_files () {
 	    fi
 	done
 	for dir in "${localedir}"/*; do
-	    if test -f "$dir/LC_MESSAGES/grub.mo" && ! test -f "${grub_install_files_target_directory}"/locale/"${dir##*/}.mo"; then
-		cp -f "$dir/LC_MESSAGES/grub.mo" "${grub_install_files_target_directory}"/locale/"${dir##*/}.mo"
+	    if test -f "$dir/LC_MESSAGES/@[email protected]" && ! test -f "${grub_install_files_target_directory}"/locale/"${dir##*/}.mo"; then
+		cp -f "$dir/LC_MESSAGES/@[email protected]" "${grub_install_files_target_directory}"/locale/"${dir##*/}.mo"
 	    fi
 	done
     else
 	for locale in $install_locales; do
 	    if test -f "${grub_install_files_source_directory}"/po/$locale.mo; then
 		cp -f " "${grub_install_files_source_directory}"/po/$locale.mo" "${grub_install_files_target_directory}"/locale/$locale.mo
-	    elif test -f "${localedir}/$locale/LC_MESSAGES/grub.mo"; then
-		cp -f "${localedir}/$locale/LC_MESSAGES/grub.mo" "${grub_install_files_target_directory}"/locale/$locale.mo
+	    elif test -f "${localedir}/$locale/LC_MESSAGES/@[email protected]"; then
+		cp -f "${localedir}/$locale/LC_MESSAGES/@[email protected]" "${grub_install_files_target_directory}"/locale/$locale.mo
 	    fi
 	done
     fi
Signature · 1 line
tg: (28877a0..) u/grub-mo (depends on: master)