src-trl/src/org/openbravo/translate/Translate_data.xsql
changeset 5067 e13fc21ebf9c
parent 2553 e61d7b9f5942
child 5935 89419c2a9a0c
equal deleted inserted replaced
5066:12c30a4b5d14 5067:e13fc21ebf9c
    48     <Parameter name="languajeFin"/>
    48     <Parameter name="languajeFin"/>
    49     <Parameter name="string"/>
    49     <Parameter name="string"/>
    50     <Parameter name="languajeFin"/>
    50     <Parameter name="languajeFin"/>
    51   </SqlMethod>
    51   </SqlMethod>
    52 
    52 
    53   <SqlMethod name="existsExpresion" type="preparedStatement" return="rowCount">
    53   <SqlMethod name="existsExpresionModFile" type="preparedStatement" return="rowCount">
    54     <SqlMethodComment>Return the translation of a text</SqlMethodComment>
    54     <SqlMethodComment>Return the translation of a text</SqlMethodComment>
    55     <Sql>
    55     <Sql>
    56          update ad_textinterfaces
    56          update ad_textinterfaces
    57            set isUsed = 'Y'
    57            set isUsed = 'Y'
    58          where ad_textinterfaces_id = ( select min(A.ad_textinterfaces_id)
    58          where ad_textinterfaces_id = ( select min(A.ad_textinterfaces_id)
    62                                                                ad_module m
    62                                                                ad_module m
    63                                                          where text     = ?
    63                                                          where text     = ?
    64                                                            and filename = ?
    64                                                            and filename = ?
    65                                                            and m.ad_module_id = t.ad_module_id
    65                                                            and m.ad_module_id = t.ad_module_id
    66                                                            and m.ad_language = ?
    66                                                            and m.ad_language = ?
    67                                                         union
    67                                                          order by o) B
    68                                                         select min(t.ad_textinterfaces_id) AS ad_textinterfaces_id, 2 AS o
    68                                                  where ad_textinterfaces_id is not null) A)
       
    69     </Sql>
       
    70     <Parameter name="text"/>
       
    71     <Parameter name="filename"/>
       
    72     <Parameter name="moduleLang"/>
       
    73   </SqlMethod>
       
    74   
       
    75   <SqlMethod name="existsExpresionNoModFile" type="preparedStatement" return="rowCount">
       
    76     <SqlMethodComment>Return the translation of a text</SqlMethodComment>
       
    77     <Sql>
       
    78          update ad_textinterfaces
       
    79            set isUsed = 'Y'
       
    80          where ad_textinterfaces_id = ( select min(A.ad_textinterfaces_id)
       
    81                                           from (select B.*
       
    82                                                 from (select min(t.ad_textinterfaces_id) AS ad_textinterfaces_id, 2 AS o
    69                                                           from ad_textinterfaces t, ad_textinterfaces_trl trl
    83                                                           from ad_textinterfaces t, ad_textinterfaces_trl trl
    70                                                          where trl.text     = ?
    84                                                          where trl.text     = ?
    71                                                            and t.filename = ?
    85                                                            and t.filename = ?
    72                                                            and trl.ad_textinterfaces_id = t.ad_textinterfaces_id
    86                                                            and trl.ad_textinterfaces_id = t.ad_textinterfaces_id
    73                                                            and trl.ad_language = ?
    87                                                            and trl.ad_language = ?
    74                                                         union
    88                                                          order by o) B
    75                                                         select min(ad_textinterfaces_id) AS ad_textinterfaces_id, 3 AS o
    89                                                  where ad_textinterfaces_id is not null) A)
       
    90     </Sql>
       
    91     
       
    92     <Parameter name="text"/>
       
    93     <Parameter name="filename"/>
       
    94     <Parameter name="moduleLang"/>
       
    95   </SqlMethod>
       
    96   
       
    97   <SqlMethod name="existsExpresionModNoFile" type="preparedStatement" return="rowCount">
       
    98     <SqlMethodComment>Return the translation of a text</SqlMethodComment>
       
    99     <Sql>
       
   100          update ad_textinterfaces
       
   101            set isUsed = 'Y'
       
   102          where ad_textinterfaces_id = ( select min(A.ad_textinterfaces_id)
       
   103                                           from (select B.*
       
   104                                                 from (select min(ad_textinterfaces_id) AS ad_textinterfaces_id, 3 AS o
    76                                                           from ad_textinterfaces t,
   105                                                           from ad_textinterfaces t,
    77                                                                ad_module m
   106                                                                ad_module m
    78                                                          where text = ?
   107                                                          where text = ?
    79                                                            and filename is null
   108                                                            and filename is null
    80                                                            and m.ad_module_id = t.ad_module_id
   109                                                            and m.ad_module_id = t.ad_module_id
    81                                                            and m.ad_language = ?
   110                                                            and m.ad_language = ?
    82                                                         union
   111                                                          order by o) B
    83                                                         select min(t.ad_textinterfaces_id) AS ad_textinterfaces_id, 4 AS o
   112                                                  where ad_textinterfaces_id is not null) A)
       
   113     </Sql>
       
   114     <Parameter name="text"/>
       
   115     <Parameter name="moduleLang"/>
       
   116   </SqlMethod>
       
   117   
       
   118   <SqlMethod name="existsExpresionNoModNoFile" type="preparedStatement" return="rowCount">
       
   119     <SqlMethodComment>Return the translation of a text</SqlMethodComment>
       
   120     <Sql>
       
   121          update ad_textinterfaces
       
   122            set isUsed = 'Y'
       
   123          where ad_textinterfaces_id = ( select min(A.ad_textinterfaces_id)
       
   124                                           from (select B.*
       
   125                                                 from (select min(t.ad_textinterfaces_id) AS ad_textinterfaces_id, 4 AS o
    84                                                           from ad_textinterfaces t, ad_textinterfaces_trl trl
   126                                                           from ad_textinterfaces t, ad_textinterfaces_trl trl
    85                                                          where trl.text = ?
   127                                                          where trl.text = ?
    86                                                            and t.filename is null
   128                                                            and t.filename is null
    87                                                            and trl.ad_textinterfaces_id = t.ad_textinterfaces_id
   129                                                            and trl.ad_textinterfaces_id = t.ad_textinterfaces_id
    88                                                            and trl.ad_language = ?
   130                                                            and trl.ad_language = ?
    89                                                          order by o) B
   131                                                          order by o) B
    90                                                  where ad_textinterfaces_id is not null) A)
   132                                                  where ad_textinterfaces_id is not null) A)
    91     </Sql>
   133     </Sql>
    92     <Parameter name="text"/>
       
    93     <Parameter name="filename"/>
       
    94     <Parameter name="moduleLang"/>
       
    95     
       
    96     <Parameter name="text"/>
       
    97     <Parameter name="filename"/>
       
    98     <Parameter name="moduleLang"/>
       
    99     
       
   100     <Parameter name="text"/>
       
   101     <Parameter name="moduleLang"/>
       
   102     
   134     
   103     <Parameter name="text"/>
   135     <Parameter name="text"/>
   104     <Parameter name="moduleLang"/>
   136     <Parameter name="moduleLang"/>
   105   </SqlMethod>
   137   </SqlMethod>
   106 
   138