Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(443)

Unified Diff: app/l10n_util_mac.h

Issue 597042: Translate: Move label parsing logic into common code. (Closed)
Patch Set: Fix indentation. Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: app/l10n_util_mac.h
diff --git a/app/l10n_util_mac.h b/app/l10n_util_mac.h
index 995d1910df3335cc379761911e26c7c4263cd0e7..6c473ac78393376a42dd7ae39a39371d69dd6999 100644
--- a/app/l10n_util_mac.h
+++ b/app/l10n_util_mac.h
@@ -42,6 +42,15 @@ NSString* GetNSStringF(int message_id,
const string16& c,
const string16& d);
+// Variants that return the offset(s) of the replaced parameters. The
+// vector based version returns offsets ordered by parameter. For example if
+// invoked with a and b offsets[0] gives the offset for a and offsets[1] the
+// offset of b regardless of where the parameters end up in the string.
+NSString* GetNSStringF(int message_id,
+ const string16& a,
+ const string16& b,
+ std::vector<size_t>* offsets);
+
// Same as GetNSString, but runs the result through FixUpWindowsStyleLabel
// before returning it.
NSString* GetNSStringWithFixup(int message_id);

Powered by Google App Engine
This is Rietveld 408576698