~ubuntu-branches/ubuntu/utopic/gpsprune/utopic

« back to all changes in this revision

Viewing changes to tim/prune/I18nManager.java

  • Committer: Package Import Robot
  • Author(s): David Paleino
  • Date: 2014-07-03 10:26:09 UTC
  • mfrom: (1.2.1) (13.1.1 experimental)
  • Revision ID: package-import@ubuntu.com-20140703102609-mtkt1enup5wfsok8
Tags: 16.2-1
* Upload to unstable.
* New upstream release.
* Switch Recommends from gnuplot to gnuplot-x11, bug reported by upstream (!)
* Bump B-D on libmetadata-extractor-java (>= 2.6.4), which was in
  experimental until now

Show diffs side-by-side

added added

removed removed

Lines of Context:
115
115
                // return the key itself
116
116
                return inKey;
117
117
        }
 
118
 
 
119
        /**
 
120
         * Lookup the given key and return the associated text, formatting with the number
 
121
         * @param inKey key to lookup (text should contain a %d)
 
122
         * @param inNumber number to substitute into the %d
 
123
         * @return associated text, or the key if not found
 
124
         */
 
125
        public static String getTextWithNumber(String inKey, int inNumber)
 
126
        {
 
127
                String localText = getText(inKey);
 
128
                try
 
129
                {
 
130
                        localText = String.format(localText, inNumber);
 
131
                }
 
132
                catch (Exception e)
 
133
                {} // printf formatting didn't work, maybe the placeholders are wrong?
 
134
                return localText;
 
135
        }
118
136
}