Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: installer/src/installer-lib/custom-i18n.h

Issue 5992177905696768: Issue #1186 - Rename symbols defined in 'installer-lib' (Closed)
Patch Set: fixed issues; rebased; new fixes from rebase Created June 19, 2015, 4:09 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « installer/src/installer-lib/DLL.cpp ('k') | installer/src/installer-lib/database.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /** 1 /**
2 * \file custom-i18n.h 2 * \file custom-i18n.h
3 */ 3 */
4 4
5 #ifndef CUSTOM_I18N_H 5 #ifndef CUSTOM_I18N_H
6 #define CUSTOM_I18N_H 6 #define CUSTOM_I18N_H
7 7
8 #include <database.h> 8 #include <database.h>
9 9
10 //------------------------------------------------------- 10 //-------------------------------------------------------
11 // Message box text 11 // Message box text
12 //------------------------------------------------------- 12 //-------------------------------------------------------
13 /** 13 /**
14 * Accessor to localizable content for custom actions. 14 * Accessor to localizable content for custom actions.
15 * 15 *
16 * This class requires that the MSI contain a custom table named "AbpUIText" in the MSI database. 16 * This class requires that the MSI contain a custom table named "AbpUIText" in the MSI database.
17 * The WiX definition of that table is in the file "custom_i18n.wxi". 17 * The WiX definition of that table is in the file "custom-i18n.wxi".
18 * Each custom action has the responsibility for defining its own rows within th is table. 18 * Each custom action has the responsibility for defining its own rows within th is table.
19 */ 19 */
20 class CustomMessageText 20 class CustomMessageText
21 { 21 {
22 Database & db ; 22 Database & db ;
23 const std::wstring component ; 23 const std::wstring component ;
24 24
25 public: 25 public:
26 CustomMessageText( Database & db, const std::wstring component ) 26 CustomMessageText( Database & db, const std::wstring component )
27 : db( db ), component( component ) 27 : db( db ), component( component )
28 {} 28 {}
29 29
30 std::wstring Text( const std::wstring id ) 30 std::wstring Text( const std::wstring id )
31 { 31 {
32 try { 32 try {
33 View v( db, L"SELECT `content` FROM `AbpUIText` WHERE `component`=? and `i d`=?" ) ; 33 View v( db, L"SELECT `content` FROM `AbpUIText` WHERE `component`=? and `i d`=?" ) ;
34 Record arg( 2 ) ; 34 Record arg( 2 ) ;
35 arg.assign_string( 1, component ) ; 35 arg.AssignString( 1, component ) ;
36 arg.assign_string( 2, id.c_str() ) ; 36 arg.AssignString( 2, id.c_str() ) ;
37 Record r( v.first( arg ) ) ; 37 Record r( v.First( arg ) ) ;
38 return r.value_string( 1 ) ; 38 return r.ValueString( 1 ) ;
39 } 39 }
40 catch( ... ) 40 catch( ... )
41 { 41 {
42 return L" " ; 42 return L" " ;
43 } 43 }
44 } 44 }
45 } ; 45 } ;
46 46
47 #endif 47 #endif
OLDNEW
« no previous file with comments | « installer/src/installer-lib/DLL.cpp ('k') | installer/src/installer-lib/database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld