64

On a MacBook Pro, is there a way to change the text in the battery life drop down?

Specifically, where it says "X:XX Remaining" I want it to say "X:XX of Apple Juice Remaining"

Why? Because a good pun is its own reword.

Yes, this is a serious question. Yes, I tried googling first.

I'm currently running Mavericks, though an upgrade to Yosemite is probably in my near future.

1 Answers1

85

You want to change line 92 of the xml version of /System/Library/CoreServices/Menu Extras/Battery.menu/Contents/Resources/English.lproj/Localizable.strings:

  1. Make a copy of the strings file:

    cp /System/Library/CoreServices/Menu\ Extras/Battery.menu/Contents/Resources/\
    English.lproj/Localizable.strings ~/Desktop
    
  2. Convert the binary strings file to xml:

    plutil -convert xml1 ~/Desktop/Localizable.strings
    
  3. Edit line 92 (Yosemite) of the file now on the desktop with your favourite text editor:

  4. Convert the xml strings file back to binary:

    plutil -convert binary1 ~/Desktop/Localizable.strings
    
  5. Back up your existing file! If you mess up, this will let you reverse your changes by removing -bak from the file name.

    sudo mv /System/Library/CoreServices/Menu\ Extras/Battery.menu/Contents/Resources/\
    English.lproj/Localizable.strings /System/Library/CoreServices/Menu\ Extras/\
    Battery.menu/Contents/Resources/English.lproj/Localizable.strings-bak
    
  6. Overwrite the old file with the new:

    sudo mv ~/Desktop/Localizable.strings /System/Library/CoreServices/Menu\ Extras/\
    Battery.menu/Contents/Resources/English.lproj/
    

Result:

grg
  • 201,078
  • 11
    You sir are a genius. – StormeHawke Nov 04 '14 at 19:52
  • 7
    I was wondering how you'd be pulling this off, but of course - locales! Nice. – Joost Nov 04 '14 at 20:27
  • 1
    Very nice solution. Note that for me the line numbers weren't the same, but it being a simple xml file it wasn't exactly difficult to track down the keys that needed to be changed. I took it further and changed other parts of the dialog text as well. Thanks for indulging my sense of humor :) – StormeHawke Nov 04 '14 at 22:36
  • 6
    Also: +1 for inserting the backup step, though it should probably be spelled out that you did so (users that stumble across this via google might not pick up on it) – StormeHawke Nov 04 '14 at 22:44
  • 7
    Something's missing from your instructions--I don't see anything in there about backing up your System file before you open ResEdit. – dodgethesteamroller Nov 05 '14 at 21:10
  • 1
    Does this procedure work in El Capitan? – user24601 Jul 10 '15 at 03:50
  • 3
    @user24601 Yes, if you disable System Integrity Protection. – grg Jul 10 '15 at 07:01