From: Jesse P. <je...@st...> - 2004-09-04 22:14:20
|
Phil, I've made it back around to fixing things... I just pulled the current cvs (and realized exactly how long it'd been since I did that). First things I noticed is that the file upload in GoodsReceivedControlled.php is not working. In the last list message I saw about this stuff you mentioned that InputSerialItems.php was causing problems in some scripts... I'm going to start poking around and see what's up - if I missed something (like you've globally disabled file stuff somehow) , let me know where it stands so I can start mucking around. While I'm at it I'll see if I can remember to make the changes for internationalization that you guys have been discussing. jesse |
From: Jesse P. <je...@st...> - 2004-09-05 00:31:35
|
Well, I see why they didn't work, at least in my setup. The form did not have enctype="multipart/form-data" . I'll start doing testing to see if it breaks things anywhere, let me know if you have any recollections about it that will help. jesse Jesse Peterson wrote: > Phil, > I've made it back around to fixing things... I just pulled the current > cvs (and realized exactly how long it'd been since I did that). First > things I noticed is that the file upload in > GoodsReceivedControlled.php is not working. In the last list message I > saw about this stuff you mentioned that InputSerialItems.php was > causing problems in some scripts... > I'm going to start poking around and see what's up - if I missed > something (like you've globally disabled file stuff somehow) , let me > know where it stands so I can start mucking around. While I'm at it > I'll see if I can remember to make the changes for > internationalization that you guys have been discussing. > > > jesse > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > _______________________________________________ > Web-erp-developers mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/web-erp-developers |
From: Daintrees <p.d...@pa...> - 2004-09-05 02:26:01
|
Good to hear from you Jesse. I am afraid I chopped a bunch of stuff in MiscFunctions preferring to have stuff all laid out in full - I like to know where a variable came from so GET and POST add context for me. I have not disabled the file upload stuff nor have I tested it this is your baby! That would be a great help re internationalisation. Thanks Phil ----- Original Message ----- From: "Jesse Peterson" <je...@st...> To: <web...@li...> Sent: Sunday, September 05, 2004 10:13 AM Subject: [Web-erp-developers] file imports for serial items > Phil, > I've made it back around to fixing things... I just pulled the current > cvs (and realized exactly how long it'd been since I did that). First > things I noticed is that the file upload in GoodsReceivedControlled.php > is not working. In the last list message I saw about this stuff you > mentioned that InputSerialItems.php was causing problems in some scripts... > I'm going to start poking around and see what's up - if I missed > something (like you've globally disabled file stuff somehow) , let me > know where it stands so I can start mucking around. While I'm at it I'll > see if I can remember to make the changes for internationalization that > you guys have been discussing. > > > jesse > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > _______________________________________________ > Web-erp-developers mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/web-erp-developers > |
From: Jesse P. <je...@st...> - 2004-09-05 04:19:18
|
>> That would be a great help re internationalization. One question on this... I saw that you asked that this be done: >> echo "<P>A long string full of $NumberOfCharacters characters"; >> would need to be re-written as: >> echo '<P>' . _('A long string full of') . ' ' . $NumberOfCharacters . ' >> ' . _('characters'); It makes perfect senses and is easy to follow. I also do not know gettext much at all. The root of what I am wondering is if php evaluates a variable in a "num = $TheNum" style string before gettext translates it or not. If not, it would probably make things a lot easier on potential translators to work with: _("A long string full of $NumberOfCharacters characters"); instead of: _('A long string full of') . ' ' . $NumberOfCharacters . ' ' . _('characters'); Luckily our code keeper is committed to readable code, so the variable name should generally describe what it is. That would give a translator 2 things - more full context to what they are translating and one less translation to do. I also know languages just enough to know that piecing together english translations in the manner underway does not necessarily produce coherent output. The more a message can be presented with context, the better the translation will be. Just a thought - not sure how feasible it is... jesse |
From: Phil D. <we...@pa...> - 2004-09-05 04:47:02
|
Thinking a little more - we dont really want variable names translated anyway - the scripts will always be in English and using the variables would be tough if they were actually translated to something else. gettext works on a bunch on languages as well as PHP but it is really only working purely with strings. Phil On Sun, 2004-09-05 at 16:19, Jesse Peterson wrote: > >> That would be a great help re internationalization. > > One question on this... I saw that you asked that this be done: > > >> echo "<P>A long string full of $NumberOfCharacters characters"; > >> would need to be re-written as: > >> echo '<P>' . _('A long string full of') . ' ' . $NumberOfCharacters . ' > >> ' . _('characters'); > > It makes perfect senses and is easy to follow. I also do not know gettext much at all. The root of what I am wondering is if php evaluates a variable in a "num = $TheNum" style string before gettext translates it or not. If not, it would probably make things a lot easier on potential translators to work with: > _("A long string full of $NumberOfCharacters characters"); > instead of: > _('A long string full of') . ' ' . $NumberOfCharacters . ' ' . _('characters'); > > Luckily our code keeper is committed to readable code, so the variable name should generally describe what it is. That would give a translator 2 things - more full context to what they are translating and one less translation to do. I also know languages just enough to know that piecing together english translations in the manner underway does not necessarily produce coherent output. The more a message can be presented with context, the better the translation will be. > Just a thought - not sure how feasible it is... > > > jesse > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > _______________________________________________ > Web-erp-developers mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/web-erp-developers > |
From: Jesse P. <je...@st...> - 2004-09-05 04:56:51
|
No, my thought was the translator would be told that things starting with $ were a variable, usually a number, (and I suppose a possible explanation of that) so they could just move them around in the translated string. I suppose a way to think of what I'm taking about is an array keyed by a full string, including variable, that had values of the translated string that should be used. Alas, as you said, it does not work like that with gettext - I supposed the 'smart' it is depends on how you might wish it to work ;) And I wasn't just suggesting it work the shorter code, it was really for the more accurate translation to help make things look that much better in the eyes of others. Still, being able to attract the user base of most any language is a very good thing, so this project you guys have undertaken is quite admirable. Glad I can help. jesse Phil Daintree wrote: >Thinking a little more - we dont really want variable names translated >anyway - the scripts will always be in English and using the variables >would be tough if they were actually translated to something else. > >gettext works on a bunch on languages as well as PHP but it is really >only working purely with strings. > >Phil > >On Sun, 2004-09-05 at 16:19, Jesse Peterson wrote: > > >>>>That would be a great help re internationalization. >>>> >>>> >>One question on this... I saw that you asked that this be done: >> >> >> >>>> echo "<P>A long string full of $NumberOfCharacters characters"; >>>>would need to be re-written as: >>>> echo '<P>' . _('A long string full of') . ' ' . $NumberOfCharacters . ' >>>> ' . _('characters'); >>>> >>>> >>It makes perfect senses and is easy to follow. I also do not know gettext much at all. The root of what I am wondering is if php evaluates a variable in a "num = $TheNum" style string before gettext translates it or not. If not, it would probably make things a lot easier on potential translators to work with: >> _("A long string full of $NumberOfCharacters characters"); >>instead of: >> _('A long string full of') . ' ' . $NumberOfCharacters . ' ' . _('characters'); >> >>Luckily our code keeper is committed to readable code, so the variable name should generally describe what it is. That would give a translator 2 things - more full context to what they are translating and one less translation to do. I also know languages just enough to know that piecing together english translations in the manner underway does not necessarily produce coherent output. The more a message can be presented with context, the better the translation will be. >>Just a thought - not sure how feasible it is... >> >> >>jesse >> >> >> >>------------------------------------------------------- >>This SF.Net email is sponsored by BEA Weblogic Workshop >>FREE Java Enterprise J2EE developer tools! >>Get your free copy of BEA WebLogic Workshop 8.1 today. >>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click >>_______________________________________________ >>Web-erp-developers mailing list >>Web...@li... >>https://lists.sourceforge.net/lists/listinfo/web-erp-developers >> >> >> > > > >------------------------------------------------------- >This SF.Net email is sponsored by BEA Weblogic Workshop >FREE Java Enterprise J2EE developer tools! >Get your free copy of BEA WebLogic Workshop 8.1 today. >http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click >_______________________________________________ >Web-erp-developers mailing list >Web...@li... >https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > |
From: skaill <sk...@ro...> - 2004-09-05 05:40:05
|
I could be way off track but I'm thinking that PHP is interpreted, not compiled. Therefore, it does not know what to do with a string until it is executing the function/command upon that string. For instance, the function could be to simply copy the string. This means you would want to copy "Hi $UserID" as "Hi $UserID", not "Hi Tom". If so, it would be the echo that indicates what to do with the string. Since the echo is executed after the gettext then the string passed to gettext would contain the variable name and not the contents of the variable. Steve ----- Original Message ----- From: "Jesse Peterson" <je...@st...> To: <web...@li...> Sent: Sunday, September 05, 2004 12:57 AM Subject: Re: [Web-erp-developers] file imports for serial items > No, my thought was the translator would be told that things starting > with $ were a variable, usually a number, (and I suppose a possible > explanation of that) so they could just move them around in the > translated string. I suppose a way to think of what I'm taking about is > an array keyed by a full string, including variable, that had values of > the translated string that should be used. > Alas, as you said, it does not work like that with gettext - I supposed > the 'smart' it is depends on how you might wish it to work ;) And I > wasn't just suggesting it work the shorter code, it was really for the > more accurate translation to help make things look that much better in > the eyes of others. Still, being able to attract the user base of most > any language is a very good thing, so this project you guys have > undertaken is quite admirable. Glad I can help. > > jesse > > > Phil Daintree wrote: > > >Thinking a little more - we dont really want variable names translated > >anyway - the scripts will always be in English and using the variables > >would be tough if they were actually translated to something else. > > > >gettext works on a bunch on languages as well as PHP but it is really > >only working purely with strings. > > > >Phil > > > >On Sun, 2004-09-05 at 16:19, Jesse Peterson wrote: > > > > > >>>>That would be a great help re internationalization. > >>>> > >>>> > >>One question on this... I saw that you asked that this be done: > >> > >> > >> > >>>> echo "<P>A long string full of $NumberOfCharacters characters"; > >>>>would need to be re-written as: > >>>> echo '<P>' . _('A long string full of') . ' ' . $NumberOfCharacters . ' > >>>> ' . _('characters'); > >>>> > >>>> > >>It makes perfect senses and is easy to follow. I also do not know gettext much at all. The root of what I am wondering is if php evaluates a variable in a "num = $TheNum" style string before gettext translates it or not. If not, it would probably make things a lot easier on potential translators to work with: > >> _("A long string full of $NumberOfCharacters characters"); > >>instead of: > >> _('A long string full of') . ' ' . $NumberOfCharacters . ' ' . _('characters'); > >> > >>Luckily our code keeper is committed to readable code, so the variable name should generally describe what it is. That would give a translator 2 things - more full context to what they are translating and one less translation to do. I also know languages just enough to know that piecing together english translations in the manner underway does not necessarily produce coherent output. The more a message can be presented with context, the better the translation will be. > >>Just a thought - not sure how feasible it is... > >> > >> > >>jesse > >> > >> > >> > >>------------------------------------------------------- > >>This SF.Net email is sponsored by BEA Weblogic Workshop > >>FREE Java Enterprise J2EE developer tools! > >>Get your free copy of BEA WebLogic Workshop 8.1 today. > >>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > >>_______________________________________________ > >>Web-erp-developers mailing list > >>Web...@li... > >>https://lists.sourceforge.net/lists/listinfo/web-erp-developers > >> > >> > >> > > > > > > > >------------------------------------------------------- > >This SF.Net email is sponsored by BEA Weblogic Workshop > >FREE Java Enterprise J2EE developer tools! > >Get your free copy of BEA WebLogic Workshop 8.1 today. > >http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > >_______________________________________________ > >Web-erp-developers mailing list > >Web...@li... > >https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > _______________________________________________ > Web-erp-developers mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/web-erp-developers |
From: Jesse P. <je...@st...> - 2004-09-05 05:45:50
|
php is interpreted in it's execution, but these functions occur within the execution, so it was a crap shoot as to which way gettext is written. Phil has repsonded to say he tested and that gettext in fact does parse & interpret the string before matching it for translation. jesse skaill wrote: >I could be way off track but I'm thinking that PHP is interpreted, not >compiled. Therefore, it does not know what to do with a string until it is >executing the function/command upon that string. For instance, the function >could be to simply copy the string. This means you would want to copy "Hi >$UserID" as "Hi $UserID", not "Hi Tom". If so, it would be the echo that >indicates what to do with the string. Since the echo is executed after the >gettext then the string passed to gettext would contain the variable name >and not the contents of the variable. > >Steve > >----- Original Message ----- >From: "Jesse Peterson" <je...@st...> >To: <web...@li...> >Sent: Sunday, September 05, 2004 12:57 AM >Subject: Re: [Web-erp-developers] file imports for serial items > > > > >>No, my thought was the translator would be told that things starting >>with $ were a variable, usually a number, (and I suppose a possible >>explanation of that) so they could just move them around in the >>translated string. I suppose a way to think of what I'm taking about is >>an array keyed by a full string, including variable, that had values of >>the translated string that should be used. >>Alas, as you said, it does not work like that with gettext - I supposed >>the 'smart' it is depends on how you might wish it to work ;) And I >>wasn't just suggesting it work the shorter code, it was really for the >>more accurate translation to help make things look that much better in >>the eyes of others. Still, being able to attract the user base of most >>any language is a very good thing, so this project you guys have >>undertaken is quite admirable. Glad I can help. >> >>jesse >> >> >>Phil Daintree wrote: >> >> >> >>>Thinking a little more - we dont really want variable names translated >>>anyway - the scripts will always be in English and using the variables >>>would be tough if they were actually translated to something else. >>> >>>gettext works on a bunch on languages as well as PHP but it is really >>>only working purely with strings. >>> >>>Phil >>> >>>On Sun, 2004-09-05 at 16:19, Jesse Peterson wrote: >>> >>> >>> >>> >>>>>>That would be a great help re internationalization. >>>>>> >>>>>> >>>>>> >>>>>> >>>>One question on this... I saw that you asked that this be done: >>>> >>>> >>>> >>>> >>>> >>>>>>echo "<P>A long string full of $NumberOfCharacters characters"; >>>>>>would need to be re-written as: >>>>>>echo '<P>' . _('A long string full of') . ' ' . $NumberOfCharacters . >>>>>> >>>>>> >' > > >>>>>>' . _('characters'); >>>>>> >>>>>> >>>>>> >>>>>> >>>>It makes perfect senses and is easy to follow. I also do not know >>>> >>>> >gettext much at all. The root of what I am wondering is if php evaluates a >variable in a "num = $TheNum" style string before gettext translates it or >not. If not, it would probably make things a lot easier on potential >translators to work with: > > >>>> _("A long string full of $NumberOfCharacters characters"); >>>>instead of: >>>> _('A long string full of') . ' ' . $NumberOfCharacters . ' ' . >>>> >>>> >_('characters'); > > >>>>Luckily our code keeper is committed to readable code, so the variable >>>> >>>> >name should generally describe what it is. That would give a translator 2 >things - more full context to what they are translating and one less >translation to do. I also know languages just enough to know that piecing >together english translations in the manner underway does not necessarily >produce coherent output. The more a message can be presented with context, >the better the translation will be. > > >>>>Just a thought - not sure how feasible it is... >>>> >>>> >>>>jesse >>>> >>>> >>>> >>>>------------------------------------------------------- >>>>This SF.Net email is sponsored by BEA Weblogic Workshop >>>>FREE Java Enterprise J2EE developer tools! >>>>Get your free copy of BEA WebLogic Workshop 8.1 today. >>>>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click >>>>_______________________________________________ >>>>Web-erp-developers mailing list >>>>Web...@li... >>>>https://lists.sourceforge.net/lists/listinfo/web-erp-developers >>>> >>>> >>>> >>>> >>>> >>> >>>------------------------------------------------------- >>>This SF.Net email is sponsored by BEA Weblogic Workshop >>>FREE Java Enterprise J2EE developer tools! >>>Get your free copy of BEA WebLogic Workshop 8.1 today. >>>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click >>>_______________________________________________ >>>Web-erp-developers mailing list >>>Web...@li... >>>https://lists.sourceforge.net/lists/listinfo/web-erp-developers >>> >>> >>> >>> >> >>------------------------------------------------------- >>This SF.Net email is sponsored by BEA Weblogic Workshop >>FREE Java Enterprise J2EE developer tools! >>Get your free copy of BEA WebLogic Workshop 8.1 today. >>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click >>_______________________________________________ >>Web-erp-developers mailing list >>Web...@li... >>https://lists.sourceforge.net/lists/listinfo/web-erp-developers >> >> > > > >------------------------------------------------------- >This SF.Net email is sponsored by BEA Weblogic Workshop >FREE Java Enterprise J2EE developer tools! >Get your free copy of BEA WebLogic Workshop 8.1 today. >http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click >_______________________________________________ >Web-erp-developers mailing list >Web...@li... >https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > |
From: skaill <sk...@ro...> - 2004-09-05 05:59:43
|
Ah. And since we don't want the variables hard code translated then it wouldn't do to translate the entire string. Steve ----- Original Message ----- From: "Jesse Peterson" <je...@st...> To: <web...@li...> Sent: Sunday, September 05, 2004 1:45 AM Subject: Re: [Web-erp-developers] file imports for serial items > php is interpreted in it's execution, but these functions occur within > the execution, so it was a crap shoot as to which way gettext is > written. Phil has repsonded to say he tested and that gettext in fact > does parse & interpret the string before matching it for translation. > > jesse > > > skaill wrote: > > >I could be way off track but I'm thinking that PHP is interpreted, not > >compiled. Therefore, it does not know what to do with a string until it is > >executing the function/command upon that string. For instance, the function > >could be to simply copy the string. This means you would want to copy "Hi > >$UserID" as "Hi $UserID", not "Hi Tom". If so, it would be the echo that > >indicates what to do with the string. Since the echo is executed after the > >gettext then the string passed to gettext would contain the variable name > >and not the contents of the variable. > > > >Steve > > > >----- Original Message ----- > >From: "Jesse Peterson" <je...@st...> > >To: <web...@li...> > >Sent: Sunday, September 05, 2004 12:57 AM > >Subject: Re: [Web-erp-developers] file imports for serial items > > > > > > > > > >>No, my thought was the translator would be told that things starting > >>with $ were a variable, usually a number, (and I suppose a possible > >>explanation of that) so they could just move them around in the > >>translated string. I suppose a way to think of what I'm taking about is > >>an array keyed by a full string, including variable, that had values of > >>the translated string that should be used. > >>Alas, as you said, it does not work like that with gettext - I supposed > >>the 'smart' it is depends on how you might wish it to work ;) And I > >>wasn't just suggesting it work the shorter code, it was really for the > >>more accurate translation to help make things look that much better in > >>the eyes of others. Still, being able to attract the user base of most > >>any language is a very good thing, so this project you guys have > >>undertaken is quite admirable. Glad I can help. > >> > >>jesse > >> > >> > >>Phil Daintree wrote: > >> > >> > >> > >>>Thinking a little more - we dont really want variable names translated > >>>anyway - the scripts will always be in English and using the variables > >>>would be tough if they were actually translated to something else. > >>> > >>>gettext works on a bunch on languages as well as PHP but it is really > >>>only working purely with strings. > >>> > >>>Phil > >>> > >>>On Sun, 2004-09-05 at 16:19, Jesse Peterson wrote: > >>> > >>> > >>> > >>> > >>>>>>That would be a great help re internationalization. > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>One question on this... I saw that you asked that this be done: > >>>> > >>>> > >>>> > >>>> > >>>> > >>>>>>echo "<P>A long string full of $NumberOfCharacters characters"; > >>>>>>would need to be re-written as: > >>>>>>echo '<P>' . _('A long string full of') . ' ' . $NumberOfCharacters . > >>>>>> > >>>>>> > >' > > > > > >>>>>>' . _('characters'); > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>It makes perfect senses and is easy to follow. I also do not know > >>>> > >>>> > >gettext much at all. The root of what I am wondering is if php evaluates a > >variable in a "num = $TheNum" style string before gettext translates it or > >not. If not, it would probably make things a lot easier on potential > >translators to work with: > > > > > >>>> _("A long string full of $NumberOfCharacters characters"); > >>>>instead of: > >>>> _('A long string full of') . ' ' . $NumberOfCharacters . ' ' . > >>>> > >>>> > >_('characters'); > > > > > >>>>Luckily our code keeper is committed to readable code, so the variable > >>>> > >>>> > >name should generally describe what it is. That would give a translator 2 > >things - more full context to what they are translating and one less > >translation to do. I also know languages just enough to know that piecing > >together english translations in the manner underway does not necessarily > >produce coherent output. The more a message can be presented with context, > >the better the translation will be. > > > > > >>>>Just a thought - not sure how feasible it is... > >>>> > >>>> > >>>>jesse > >>>> > >>>> > >>>> > >>>>------------------------------------------------------- > >>>>This SF.Net email is sponsored by BEA Weblogic Workshop > >>>>FREE Java Enterprise J2EE developer tools! > >>>>Get your free copy of BEA WebLogic Workshop 8.1 today. > >>>>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > >>>>_______________________________________________ > >>>>Web-erp-developers mailing list > >>>>Web...@li... > >>>>https://lists.sourceforge.net/lists/listinfo/web-erp-developers > >>>> > >>>> > >>>> > >>>> > >>>> > >>> > >>>------------------------------------------------------- > >>>This SF.Net email is sponsored by BEA Weblogic Workshop > >>>FREE Java Enterprise J2EE developer tools! > >>>Get your free copy of BEA WebLogic Workshop 8.1 today. > >>>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > >>>_______________________________________________ > >>>Web-erp-developers mailing list > >>>Web...@li... > >>>https://lists.sourceforge.net/lists/listinfo/web-erp-developers > >>> > >>> > >>> > >>> > >> > >>------------------------------------------------------- > >>This SF.Net email is sponsored by BEA Weblogic Workshop > >>FREE Java Enterprise J2EE developer tools! > >>Get your free copy of BEA WebLogic Workshop 8.1 today. > >>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > >>_______________________________________________ > >>Web-erp-developers mailing list > >>Web...@li... > >>https://lists.sourceforge.net/lists/listinfo/web-erp-developers > >> > >> > > > > > > > >------------------------------------------------------- > >This SF.Net email is sponsored by BEA Weblogic Workshop > >FREE Java Enterprise J2EE developer tools! > >Get your free copy of BEA WebLogic Workshop 8.1 today. > >http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > >_______________________________________________ > >Web-erp-developers mailing list > >Web...@li... > >https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > _______________________________________________ > Web-erp-developers mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/web-erp-developers |
From: Daintrees <p.d...@pa...> - 2004-09-05 06:56:34
|
Well I didn't actually test that bit. We are actually using xgettext to extract all the strings from the files that have strings inside the gettext function calls. xgettext wont extract strings that include variables inside them and with flagging enthusisasm for multi-language - I don't want to have to take strings manually to the messages.po I want this created automatically using xgettext. There is a chance that your suggestion might work Jesse, its just that if it does, it would involve a LOT more work and introduce more possible causes of problems. Translators would have to know to keep the name of the variable exactly the same and might not. Phil ----- Original Message ----- From: "skaill" <sk...@ro...> To: <web...@li...> Sent: Sunday, September 05, 2004 6:00 PM Subject: Re: [Web-erp-developers] file imports for serial items > Ah. And since we don't want the variables hard code translated then it > wouldn't do to translate the entire string. > > Steve > > ----- Original Message ----- > From: "Jesse Peterson" <je...@st...> > To: <web...@li...> > Sent: Sunday, September 05, 2004 1:45 AM > Subject: Re: [Web-erp-developers] file imports for serial items > > > > php is interpreted in it's execution, but these functions occur within > > the execution, so it was a crap shoot as to which way gettext is > > written. Phil has repsonded to say he tested and that gettext in fact > > does parse & interpret the string before matching it for translation. > > > > jesse > > > > > > skaill wrote: > > > > >I could be way off track but I'm thinking that PHP is interpreted, not > > >compiled. Therefore, it does not know what to do with a string until it > is > > >executing the function/command upon that string. For instance, the > function > > >could be to simply copy the string. This means you would want to copy > "Hi > > >$UserID" as "Hi $UserID", not "Hi Tom". If so, it would be the echo that > > >indicates what to do with the string. Since the echo is executed after > the > > >gettext then the string passed to gettext would contain the variable name > > >and not the contents of the variable. > > > > > >Steve > > > > > >----- Original Message ----- > > >From: "Jesse Peterson" <je...@st...> > > >To: <web...@li...> > > >Sent: Sunday, September 05, 2004 12:57 AM > > >Subject: Re: [Web-erp-developers] file imports for serial items > > > > > > > > > > > > > > >>No, my thought was the translator would be told that things starting > > >>with $ were a variable, usually a number, (and I suppose a possible > > >>explanation of that) so they could just move them around in the > > >>translated string. I suppose a way to think of what I'm taking about is > > >>an array keyed by a full string, including variable, that had values of > > >>the translated string that should be used. > > >>Alas, as you said, it does not work like that with gettext - I supposed > > >>the 'smart' it is depends on how you might wish it to work ;) And I > > >>wasn't just suggesting it work the shorter code, it was really for the > > >>more accurate translation to help make things look that much better in > > >>the eyes of others. Still, being able to attract the user base of most > > >>any language is a very good thing, so this project you guys have > > >>undertaken is quite admirable. Glad I can help. > > >> > > >>jesse > > >> > > >> > > >>Phil Daintree wrote: > > >> > > >> > > >> > > >>>Thinking a little more - we dont really want variable names translated > > >>>anyway - the scripts will always be in English and using the variables > > >>>would be tough if they were actually translated to something else. > > >>> > > >>>gettext works on a bunch on languages as well as PHP but it is really > > >>>only working purely with strings. > > >>> > > >>>Phil > > >>> > > >>>On Sun, 2004-09-05 at 16:19, Jesse Peterson wrote: > > >>> > > >>> > > >>> > > >>> > > >>>>>>That would be a great help re internationalization. > > >>>>>> > > >>>>>> > > >>>>>> > > >>>>>> > > >>>>One question on this... I saw that you asked that this be done: > > >>>> > > >>>> > > >>>> > > >>>> > > >>>> > > >>>>>>echo "<P>A long string full of $NumberOfCharacters characters"; > > >>>>>>would need to be re-written as: > > >>>>>>echo '<P>' . _('A long string full of') . ' ' . $NumberOfCharacters > . > > >>>>>> > > >>>>>> > > >' > > > > > > > > >>>>>>' . _('characters'); > > >>>>>> > > >>>>>> > > >>>>>> > > >>>>>> > > >>>>It makes perfect senses and is easy to follow. I also do not know > > >>>> > > >>>> > > >gettext much at all. The root of what I am wondering is if php evaluates > a > > >variable in a "num = $TheNum" style string before gettext translates it > or > > >not. If not, it would probably make things a lot easier on potential > > >translators to work with: > > > > > > > > >>>> _("A long string full of $NumberOfCharacters characters"); > > >>>>instead of: > > >>>> _('A long string full of') . ' ' . $NumberOfCharacters . ' ' . > > >>>> > > >>>> > > >_('characters'); > > > > > > > > >>>>Luckily our code keeper is committed to readable code, so the variable > > >>>> > > >>>> > > >name should generally describe what it is. That would give a translator 2 > > >things - more full context to what they are translating and one less > > >translation to do. I also know languages just enough to know that piecing > > >together english translations in the manner underway does not necessarily > > >produce coherent output. The more a message can be presented with > context, > > >the better the translation will be. > > > > > > > > >>>>Just a thought - not sure how feasible it is... > > >>>> > > >>>> > > >>>>jesse > > >>>> > > >>>> > > >>>> > > >>>>------------------------------------------------------- > > >>>>This SF.Net email is sponsored by BEA Weblogic Workshop > > >>>>FREE Java Enterprise J2EE developer tools! > > >>>>Get your free copy of BEA WebLogic Workshop 8.1 today. > > >>>>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > > >>>>_______________________________________________ > > >>>>Web-erp-developers mailing list > > >>>>Web...@li... > > >>>>https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > >>>> > > >>>> > > >>>> > > >>>> > > >>>> > > >>> > > >>>------------------------------------------------------- > > >>>This SF.Net email is sponsored by BEA Weblogic Workshop > > >>>FREE Java Enterprise J2EE developer tools! > > >>>Get your free copy of BEA WebLogic Workshop 8.1 today. > > >>>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > > >>>_______________________________________________ > > >>>Web-erp-developers mailing list > > >>>Web...@li... > > >>>https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > >>> > > >>> > > >>> > > >>> > > >> > > >>------------------------------------------------------- > > >>This SF.Net email is sponsored by BEA Weblogic Workshop > > >>FREE Java Enterprise J2EE developer tools! > > >>Get your free copy of BEA WebLogic Workshop 8.1 today. > > >>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > > >>_______________________________________________ > > >>Web-erp-developers mailing list > > >>Web...@li... > > >>https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > >> > > >> > > > > > > > > > > > >------------------------------------------------------- > > >This SF.Net email is sponsored by BEA Weblogic Workshop > > >FREE Java Enterprise J2EE developer tools! > > >Get your free copy of BEA WebLogic Workshop 8.1 today. > > >http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > > >_______________________________________________ > > >Web-erp-developers mailing list > > >Web...@li... > > >https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > > > > > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by BEA Weblogic Workshop > > FREE Java Enterprise J2EE developer tools! > > Get your free copy of BEA WebLogic Workshop 8.1 today. > > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > > _______________________________________________ > > Web-erp-developers mailing list > > Web...@li... > > https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > _______________________________________________ > Web-erp-developers mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/web-erp-developers > |
From: Jesse P. <je...@st...> - 2004-09-05 17:00:10
|
I've done some testing and digging today and it would seem that there is no way to do the translation w/ variables I was talking about without either employing a wrapper class of sorts or using printf variable positioning syntax that could be very confusing. I did not test this, but it likely would be an easy class to drop in... http://phptal.sourceforge.net/bagpack/GetText/class.GetText.html It look like it is basically a wrapper to gettext... that would still require translators to be able to move around variables and a little extra typing on our part... I think having vars written in the ${varname} syntax would make it easier for a non-programmer, though. I'm just thinking about how bad the translations may get chopping up sentences... jesse Daintrees wrote: >Well I didn't actually test that bit. > >We are actually using xgettext to extract all the strings from the files >that have strings inside the gettext function calls. xgettext wont extract >strings that include variables inside them and with flagging enthusisasm for >multi-language - I don't want to have to take strings manually to the >messages.po I want this created automatically using xgettext. > >There is a chance that your suggestion might work Jesse, its just that if it >does, it would involve a LOT more work and introduce more possible causes of >problems. Translators would have to know to keep the name of the variable >exactly the same and might not. > >Phil > > >----- Original Message ----- >From: "skaill" <sk...@ro...> >To: <web...@li...> >Sent: Sunday, September 05, 2004 6:00 PM >Subject: Re: [Web-erp-developers] file imports for serial items > > > > >>Ah. And since we don't want the variables hard code translated then it >>wouldn't do to translate the entire string. >> >>Steve >> >>----- Original Message ----- >>From: "Jesse Peterson" <je...@st...> >>To: <web...@li...> >>Sent: Sunday, September 05, 2004 1:45 AM >>Subject: Re: [Web-erp-developers] file imports for serial items >> >> >> >> >>>php is interpreted in it's execution, but these functions occur within >>>the execution, so it was a crap shoot as to which way gettext is >>>written. Phil has repsonded to say he tested and that gettext in fact >>>does parse & interpret the string before matching it for translation. >>> >>>jesse >>> >>> >>>skaill wrote: >>> >>> >>> >>>>I could be way off track but I'm thinking that PHP is interpreted, not >>>>compiled. Therefore, it does not know what to do with a string until >>>> >>>> >it > > >>is >> >> >>>>executing the function/command upon that string. For instance, the >>>> >>>> >>function >> >> >>>>could be to simply copy the string. This means you would want to copy >>>> >>>> >>"Hi >> >> >>>>$UserID" as "Hi $UserID", not "Hi Tom". If so, it would be the echo >>>> >>>> >that > > >>>>indicates what to do with the string. Since the echo is executed after >>>> >>>> >>the >> >> >>>>gettext then the string passed to gettext would contain the variable >>>> >>>> >name > > >>>>and not the contents of the variable. >>>> >>>>Steve >>>> >>>>----- Original Message ----- >>>>From: "Jesse Peterson" <je...@st...> >>>>To: <web...@li...> >>>>Sent: Sunday, September 05, 2004 12:57 AM >>>>Subject: Re: [Web-erp-developers] file imports for serial items >>>> >>>> >>>> >>>> >>>> >>>> >>>>>No, my thought was the translator would be told that things starting >>>>>with $ were a variable, usually a number, (and I suppose a possible >>>>>explanation of that) so they could just move them around in the >>>>>translated string. I suppose a way to think of what I'm taking about >>>>> >>>>> >is > > >>>>>an array keyed by a full string, including variable, that had values >>>>> >>>>> >of > > >>>>>the translated string that should be used. >>>>>Alas, as you said, it does not work like that with gettext - I >>>>> >>>>> >supposed > > >>>>>the 'smart' it is depends on how you might wish it to work ;) And I >>>>>wasn't just suggesting it work the shorter code, it was really for the >>>>>more accurate translation to help make things look that much better in >>>>>the eyes of others. Still, being able to attract the user base of most >>>>>any language is a very good thing, so this project you guys have >>>>>undertaken is quite admirable. Glad I can help. >>>>> >>>>>jesse >>>>> >>>>> >>>>>Phil Daintree wrote: >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>>Thinking a little more - we dont really want variable names >>>>>> >>>>>> >translated > > >>>>>>anyway - the scripts will always be in English and using the >>>>>> >>>>>> >variables > > >>>>>>would be tough if they were actually translated to something else. >>>>>> >>>>>>gettext works on a bunch on languages as well as PHP but it is really >>>>>>only working purely with strings. >>>>>> >>>>>>Phil >>>>>> >>>>>>On Sun, 2004-09-05 at 16:19, Jesse Peterson wrote: >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>>>>That would be a great help re internationalization. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>One question on this... I saw that you asked that this be done: >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>>>>echo "<P>A long string full of $NumberOfCharacters characters"; >>>>>>>>>would need to be re-written as: >>>>>>>>>echo '<P>' . _('A long string full of') . ' ' . >>>>>>>>> >>>>>>>>> >$NumberOfCharacters > > >>. >> >> >>>>>>>>> >>>>>>>>> >>>>' >>>> >>>> >>>> >>>> >>>>>>>>>' . _('characters'); >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>It makes perfect senses and is easy to follow. I also do not know >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>gettext much at all. The root of what I am wondering is if php >>>> >>>> >evaluates > > >>a >> >> >>>>variable in a "num = $TheNum" style string before gettext translates it >>>> >>>> >>or >> >> >>>>not. If not, it would probably make things a lot easier on potential >>>>translators to work with: >>>> >>>> >>>> >>>> >>>>>>> _("A long string full of $NumberOfCharacters characters"); >>>>>>>instead of: >>>>>>> _('A long string full of') . ' ' . $NumberOfCharacters . ' ' . >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>_('characters'); >>>> >>>> >>>> >>>> >>>>>>>Luckily our code keeper is committed to readable code, so the >>>>>>> >>>>>>> >variable > > >>>>>>> >>>>>>> >>>>name should generally describe what it is. That would give a translator >>>> >>>> >2 > > >>>>things - more full context to what they are translating and one less >>>>translation to do. I also know languages just enough to know that >>>> >>>> >piecing > > >>>>together english translations in the manner underway does not >>>> >>>> >necessarily > > >>>>produce coherent output. The more a message can be presented with >>>> >>>> >>context, >> >> >>>>the better the translation will be. >>>> >>>> >>>> >>>> >>>>>>>Just a thought - not sure how feasible it is... >>>>>>> >>>>>>> >>>>>>>jesse >>>>>>> >>>>>>> >>>>>>> >>>>>>>------------------------------------------------------- >>>>>>>This SF.Net email is sponsored by BEA Weblogic Workshop >>>>>>>FREE Java Enterprise J2EE developer tools! >>>>>>>Get your free copy of BEA WebLogic Workshop 8.1 today. >>>>>>>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click >>>>>>>_______________________________________________ >>>>>>>Web-erp-developers mailing list >>>>>>>Web...@li... >>>>>>>https://lists.sourceforge.net/lists/listinfo/web-erp-developers >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>------------------------------------------------------- >>>>>>This SF.Net email is sponsored by BEA Weblogic Workshop >>>>>>FREE Java Enterprise J2EE developer tools! >>>>>>Get your free copy of BEA WebLogic Workshop 8.1 today. >>>>>>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click >>>>>>_______________________________________________ >>>>>>Web-erp-developers mailing list >>>>>>Web...@li... >>>>>>https://lists.sourceforge.net/lists/listinfo/web-erp-developers >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>------------------------------------------------------- >>>>>This SF.Net email is sponsored by BEA Weblogic Workshop >>>>>FREE Java Enterprise J2EE developer tools! >>>>>Get your free copy of BEA WebLogic Workshop 8.1 today. >>>>>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click >>>>>_______________________________________________ >>>>>Web-erp-developers mailing list >>>>>Web...@li... >>>>>https://lists.sourceforge.net/lists/listinfo/web-erp-developers >>>>> >>>>> >>>>> >>>>> >>>> >>>>------------------------------------------------------- >>>>This SF.Net email is sponsored by BEA Weblogic Workshop >>>>FREE Java Enterprise J2EE developer tools! >>>>Get your free copy of BEA WebLogic Workshop 8.1 today. >>>>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click >>>>_______________________________________________ >>>>Web-erp-developers mailing list >>>>Web...@li... >>>>https://lists.sourceforge.net/lists/listinfo/web-erp-developers >>>> >>>> >>>> >>>> >>> >>>------------------------------------------------------- >>>This SF.Net email is sponsored by BEA Weblogic Workshop >>>FREE Java Enterprise J2EE developer tools! >>>Get your free copy of BEA WebLogic Workshop 8.1 today. >>>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click >>>_______________________________________________ >>>Web-erp-developers mailing list >>>Web...@li... >>>https://lists.sourceforge.net/lists/listinfo/web-erp-developers >>> >>> >> >>------------------------------------------------------- >>This SF.Net email is sponsored by BEA Weblogic Workshop >>FREE Java Enterprise J2EE developer tools! >>Get your free copy of BEA WebLogic Workshop 8.1 today. >>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click >>_______________________________________________ >>Web-erp-developers mailing list >>Web...@li... >>https://lists.sourceforge.net/lists/listinfo/web-erp-developers >> >> >> > > > >------------------------------------------------------- >This SF.Net email is sponsored by BEA Weblogic Workshop >FREE Java Enterprise J2EE developer tools! >Get your free copy of BEA WebLogic Workshop 8.1 today. >http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click >_______________________________________________ >Web-erp-developers mailing list >Web...@li... >https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > |
From: Stins, D. <DR...@Zi...> - 2004-09-05 18:07:50
|
Jesse, This package is nice. Only we need an extra step. "declare" all variables. But that's an advantage too because it's shows directly an error when you make some typing mistakes like "name" instead of "names". with best regards, Dick Stins ----- Original Message ----- From: "Jesse Peterson" <je...@st...> To: <web...@li...> Sent: Sunday, September 05, 2004 7:00 PM Subject: Re: [Web-erp-developers] file imports for serial items > I've done some testing and digging today and it would seem that there is > no way to do the translation w/ variables I was talking about without > either employing a wrapper class of sorts or using printf variable > positioning syntax that could be very confusing. > I did not test this, but it likely would be an easy class to drop in... > http://phptal.sourceforge.net/bagpack/GetText/class.GetText.html > It look like it is basically a wrapper to gettext... > > that would still require translators to be able to move around variables > and a little extra typing on our part... I think having vars written in > the ${varname} syntax would make it easier for a non-programmer, though. > I'm just thinking about how bad the translations may get chopping up > sentences... > > jesse > > > Daintrees wrote: > > >Well I didn't actually test that bit. > > > >We are actually using xgettext to extract all the strings from the files > >that have strings inside the gettext function calls. xgettext wont extract > >strings that include variables inside them and with flagging enthusisasm for > >multi-language - I don't want to have to take strings manually to the > >messages.po I want this created automatically using xgettext. > > > >There is a chance that your suggestion might work Jesse, its just that if it > >does, it would involve a LOT more work and introduce more possible causes of > >problems. Translators would have to know to keep the name of the variable > >exactly the same and might not. > > > >Phil > > > > > >----- Original Message ----- > >From: "skaill" <sk...@ro...> > >To: <web...@li...> > >Sent: Sunday, September 05, 2004 6:00 PM > >Subject: Re: [Web-erp-developers] file imports for serial items > > > > > > > > > >>Ah. And since we don't want the variables hard code translated then it > >>wouldn't do to translate the entire string. > >> > >>Steve > >> > >>----- Original Message ----- > >>From: "Jesse Peterson" <je...@st...> > >>To: <web...@li...> > >>Sent: Sunday, September 05, 2004 1:45 AM > >>Subject: Re: [Web-erp-developers] file imports for serial items > >> > >> > >> > >> > >>>php is interpreted in it's execution, but these functions occur within > >>>the execution, so it was a crap shoot as to which way gettext is > >>>written. Phil has repsonded to say he tested and that gettext in fact > >>>does parse & interpret the string before matching it for translation. > >>> > >>>jesse > >>> > >>> > >>>skaill wrote: > >>> > >>> > >>> > >>>>I could be way off track but I'm thinking that PHP is interpreted, not > >>>>compiled. Therefore, it does not know what to do with a string until > >>>> > >>>> > >it > > > > > >>is > >> > >> > >>>>executing the function/command upon that string. For instance, the > >>>> > >>>> > >>function > >> > >> > >>>>could be to simply copy the string. This means you would want to copy > >>>> > >>>> > >>"Hi > >> > >> > >>>>$UserID" as "Hi $UserID", not "Hi Tom". If so, it would be the echo > >>>> > >>>> > >that > > > > > >>>>indicates what to do with the string. Since the echo is executed after > >>>> > >>>> > >>the > >> > >> > >>>>gettext then the string passed to gettext would contain the variable > >>>> > >>>> > >name > > > > > >>>>and not the contents of the variable. > >>>> > >>>>Steve > >>>> > >>>>----- Original Message ----- > >>>>From: "Jesse Peterson" <je...@st...> > >>>>To: <web...@li...> > >>>>Sent: Sunday, September 05, 2004 12:57 AM > >>>>Subject: Re: [Web-erp-developers] file imports for serial items > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>>>No, my thought was the translator would be told that things starting > >>>>>with $ were a variable, usually a number, (and I suppose a possible > >>>>>explanation of that) so they could just move them around in the > >>>>>translated string. I suppose a way to think of what I'm taking about > >>>>> > >>>>> > >is > > > > > >>>>>an array keyed by a full string, including variable, that had values > >>>>> > >>>>> > >of > > > > > >>>>>the translated string that should be used. > >>>>>Alas, as you said, it does not work like that with gettext - I > >>>>> > >>>>> > >supposed > > > > > >>>>>the 'smart' it is depends on how you might wish it to work ;) And I > >>>>>wasn't just suggesting it work the shorter code, it was really for the > >>>>>more accurate translation to help make things look that much better in > >>>>>the eyes of others. Still, being able to attract the user base of most > >>>>>any language is a very good thing, so this project you guys have > >>>>>undertaken is quite admirable. Glad I can help. > >>>>> > >>>>>jesse > >>>>> > >>>>> > >>>>>Phil Daintree wrote: > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > >>>>>>Thinking a little more - we dont really want variable names > >>>>>> > >>>>>> > >translated > > > > > >>>>>>anyway - the scripts will always be in English and using the > >>>>>> > >>>>>> > >variables > > > > > >>>>>>would be tough if they were actually translated to something else. > >>>>>> > >>>>>>gettext works on a bunch on languages as well as PHP but it is really > >>>>>>only working purely with strings. > >>>>>> > >>>>>>Phil > >>>>>> > >>>>>>On Sun, 2004-09-05 at 16:19, Jesse Peterson wrote: > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>>>>>That would be a great help re internationalization. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>One question on this... I saw that you asked that this be done: > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>>>>echo "<P>A long string full of $NumberOfCharacters characters"; > >>>>>>>>>would need to be re-written as: > >>>>>>>>>echo '<P>' . _('A long string full of') . ' ' . > >>>>>>>>> > >>>>>>>>> > >$NumberOfCharacters > > > > > >>. > >> > >> > >>>>>>>>> > >>>>>>>>> > >>>>' > >>>> > >>>> > >>>> > >>>> > >>>>>>>>>' . _('characters'); > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>It makes perfect senses and is easy to follow. I also do not know > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>gettext much at all. The root of what I am wondering is if php > >>>> > >>>> > >evaluates > > > > > >>a > >> > >> > >>>>variable in a "num = $TheNum" style string before gettext translates it > >>>> > >>>> > >>or > >> > >> > >>>>not. If not, it would probably make things a lot easier on potential > >>>>translators to work with: > >>>> > >>>> > >>>> > >>>> > >>>>>>> _("A long string full of $NumberOfCharacters characters"); > >>>>>>>instead of: > >>>>>>> _('A long string full of') . ' ' . $NumberOfCharacters . ' ' . > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>_('characters'); > >>>> > >>>> > >>>> > >>>> > >>>>>>>Luckily our code keeper is committed to readable code, so the > >>>>>>> > >>>>>>> > >variable > > > > > >>>>>>> > >>>>>>> > >>>>name should generally describe what it is. That would give a translator > >>>> > >>>> > >2 > > > > > >>>>things - more full context to what they are translating and one less > >>>>translation to do. I also know languages just enough to know that > >>>> > >>>> > >piecing > > > > > >>>>together english translations in the manner underway does not > >>>> > >>>> > >necessarily > > > > > >>>>produce coherent output. The more a message can be presented with > >>>> > >>>> > >>context, > >> > >> > >>>>the better the translation will be. > >>>> > >>>> > >>>> > >>>> > >>>>>>>Just a thought - not sure how feasible it is... > >>>>>>> > >>>>>>> > >>>>>>>jesse > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>>------------------------------------------------------- > >>>>>>>This SF.Net email is sponsored by BEA Weblogic Workshop > >>>>>>>FREE Java Enterprise J2EE developer tools! > >>>>>>>Get your free copy of BEA WebLogic Workshop 8.1 today. > >>>>>>>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > >>>>>>>_______________________________________________ > >>>>>>>Web-erp-developers mailing list > >>>>>>>Web...@li... > >>>>>>>https://lists.sourceforge.net/lists/listinfo/web-erp-developers > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>------------------------------------------------------- > >>>>>>This SF.Net email is sponsored by BEA Weblogic Workshop > >>>>>>FREE Java Enterprise J2EE developer tools! > >>>>>>Get your free copy of BEA WebLogic Workshop 8.1 today. > >>>>>>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > >>>>>>_______________________________________________ > >>>>>>Web-erp-developers mailing list > >>>>>>Web...@li... > >>>>>>https://lists.sourceforge.net/lists/listinfo/web-erp-developers > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>------------------------------------------------------- > >>>>>This SF.Net email is sponsored by BEA Weblogic Workshop > >>>>>FREE Java Enterprise J2EE developer tools! > >>>>>Get your free copy of BEA WebLogic Workshop 8.1 today. > >>>>>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > >>>>>_______________________________________________ > >>>>>Web-erp-developers mailing list > >>>>>Web...@li... > >>>>>https://lists.sourceforge.net/lists/listinfo/web-erp-developers > >>>>> > >>>>> > >>>>> > >>>>> > >>>> > >>>>------------------------------------------------------- > >>>>This SF.Net email is sponsored by BEA Weblogic Workshop > >>>>FREE Java Enterprise J2EE developer tools! > >>>>Get your free copy of BEA WebLogic Workshop 8.1 today. > >>>>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > >>>>_______________________________________________ > >>>>Web-erp-developers mailing list > >>>>Web...@li... > >>>>https://lists.sourceforge.net/lists/listinfo/web-erp-developers > >>>> > >>>> > >>>> > >>>> > >>> > >>>------------------------------------------------------- > >>>This SF.Net email is sponsored by BEA Weblogic Workshop > >>>FREE Java Enterprise J2EE developer tools! > >>>Get your free copy of BEA WebLogic Workshop 8.1 today. > >>>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > >>>_______________________________________________ > >>>Web-erp-developers mailing list > >>>Web...@li... > >>>https://lists.sourceforge.net/lists/listinfo/web-erp-developers > >>> > >>> > >> > >>------------------------------------------------------- > >>This SF.Net email is sponsored by BEA Weblogic Workshop > >>FREE Java Enterprise J2EE developer tools! > >>Get your free copy of BEA WebLogic Workshop 8.1 today. > >>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > >>_______________________________________________ > >>Web-erp-developers mailing list > >>Web...@li... > >>https://lists.sourceforge.net/lists/listinfo/web-erp-developers > >> > >> > >> > > > > > > > >------------------------------------------------------- > >This SF.Net email is sponsored by BEA Weblogic Workshop > >FREE Java Enterprise J2EE developer tools! > >Get your free copy of BEA WebLogic Workshop 8.1 today. > >http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > >_______________________________________________ > >Web-erp-developers mailing list > >Web...@li... > >https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > _______________________________________________ > Web-erp-developers mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/web-erp-developers |
From: skaill <sk...@ro...> - 2004-09-05 20:37:03
|
Forcing the Declaration of all variables would eliminate many possible problems/errors. If we compare the pros and cons I get: Pros 1) We would need to evaluate how much further it gets the translation compared to not using. 2) It would cut down on work to piece the strings and preserve the strings in tact which would be more readable, however, I have always built my strings in the way we're cutting them up anyway as opposed to embedding the variables. I never liked the idea of the preprocessing of variables within strings and also always thought it was more self-documenting having the variables stick out through concatenation with the string pieces. Cons 1) The possible slowdowns of using the class instead of built in php processor gettext code 2) What's with the setVar? Does that mean we need to add setVars for every var used in a string? That will be some more work. 3) Do the tolls for making the po's such as xgettext all work smoothly with this enhancement? 4) If setVar is not done on a variable then I'm thinking what will happen is the variable name with $ will appear instead of the variable's value. This could get easily missed by various people at various times. 5) How stable and used is this class? Steve ----- Original Message ----- From: "Stins, Dick" <DR...@Zi...> To: <web...@li...> Sent: Sunday, September 05, 2004 2:12 PM Subject: Re: [Web-erp-developers] file imports for serial items > Jesse, > > This package is nice. Only we need an extra step. "declare" all variables. > But that's an advantage too because it's shows directly an error when you > make some typing mistakes like "name" instead of "names". > > with best regards, > > Dick Stins > > ----- Original Message ----- > From: "Jesse Peterson" <je...@st...> > To: <web...@li...> > Sent: Sunday, September 05, 2004 7:00 PM > Subject: Re: [Web-erp-developers] file imports for serial items > > > > I've done some testing and digging today and it would seem that there is > > no way to do the translation w/ variables I was talking about without > > either employing a wrapper class of sorts or using printf variable > > positioning syntax that could be very confusing. > > I did not test this, but it likely would be an easy class to drop in... > > http://phptal.sourceforge.net/bagpack/GetText/class.GetText.html > > It look like it is basically a wrapper to gettext... > > > > that would still require translators to be able to move around variables > > and a little extra typing on our part... I think having vars written in > > the ${varname} syntax would make it easier for a non-programmer, though. > > I'm just thinking about how bad the translations may get chopping up > > sentences... > > > > jesse > > > > > > Daintrees wrote: > > > > >Well I didn't actually test that bit. > > > > > >We are actually using xgettext to extract all the strings from the files > > >that have strings inside the gettext function calls. xgettext wont > extract > > >strings that include variables inside them and with flagging enthusisasm > for > > >multi-language - I don't want to have to take strings manually to the > > >messages.po I want this created automatically using xgettext. > > > > > >There is a chance that your suggestion might work Jesse, its just that if > it > > >does, it would involve a LOT more work and introduce more possible causes > of > > >problems. Translators would have to know to keep the name of the variable > > >exactly the same and might not. > > > > > >Phil > > > > > > > > >----- Original Message ----- > > >From: "skaill" <sk...@ro...> > > >To: <web...@li...> > > >Sent: Sunday, September 05, 2004 6:00 PM > > >Subject: Re: [Web-erp-developers] file imports for serial items > > > > > > > > > > > > > > >>Ah. And since we don't want the variables hard code translated then it > > >>wouldn't do to translate the entire string. > > >> > > >>Steve > > >> > > >>----- Original Message ----- > > >>From: "Jesse Peterson" <je...@st...> > > >>To: <web...@li...> > > >>Sent: Sunday, September 05, 2004 1:45 AM > > >>Subject: Re: [Web-erp-developers] file imports for serial items > > >> > > >> > > >> > > >> > > >>>php is interpreted in it's execution, but these functions occur within > > >>>the execution, so it was a crap shoot as to which way gettext is > > >>>written. Phil has repsonded to say he tested and that gettext in fact > > >>>does parse & interpret the string before matching it for translation. > > >>> > > >>>jesse > > >>> > > >>> > > >>>skaill wrote: > > >>> > > >>> > > >>> > > >>>>I could be way off track but I'm thinking that PHP is interpreted, not > > >>>>compiled. Therefore, it does not know what to do with a string until > > >>>> > > >>>> > > >it > > > > > > > > >>is > > >> > > >> > > >>>>executing the function/command upon that string. For instance, the > > >>>> > > >>>> > > >>function > > >> > > >> > > >>>>could be to simply copy the string. This means you would want to copy > > >>>> > > >>>> > > >>"Hi > > >> > > >> > > >>>>$UserID" as "Hi $UserID", not "Hi Tom". If so, it would be the echo > > >>>> > > >>>> > > >that > > > > > > > > >>>>indicates what to do with the string. Since the echo is executed > after > > >>>> > > >>>> > > >>the > > >> > > >> > > >>>>gettext then the string passed to gettext would contain the variable > > >>>> > > >>>> > > >name > > > > > > > > >>>>and not the contents of the variable. > > >>>> > > >>>>Steve > > >>>> > > >>>>----- Original Message ----- > > >>>>From: "Jesse Peterson" <je...@st...> > > >>>>To: <web...@li...> > > >>>>Sent: Sunday, September 05, 2004 12:57 AM > > >>>>Subject: Re: [Web-erp-developers] file imports for serial items > > >>>> > > >>>> > > >>>> > > >>>> > > >>>> > > >>>> > > >>>>>No, my thought was the translator would be told that things starting > > >>>>>with $ were a variable, usually a number, (and I suppose a possible > > >>>>>explanation of that) so they could just move them around in the > > >>>>>translated string. I suppose a way to think of what I'm taking about > > >>>>> > > >>>>> > > >is > > > > > > > > >>>>>an array keyed by a full string, including variable, that had values > > >>>>> > > >>>>> > > >of > > > > > > > > >>>>>the translated string that should be used. > > >>>>>Alas, as you said, it does not work like that with gettext - I > > >>>>> > > >>>>> > > >supposed > > > > > > > > >>>>>the 'smart' it is depends on how you might wish it to work ;) And I > > >>>>>wasn't just suggesting it work the shorter code, it was really for > the > > >>>>>more accurate translation to help make things look that much better > in > > >>>>>the eyes of others. Still, being able to attract the user base of > most > > >>>>>any language is a very good thing, so this project you guys have > > >>>>>undertaken is quite admirable. Glad I can help. > > >>>>> > > >>>>>jesse > > >>>>> > > >>>>> > > >>>>>Phil Daintree wrote: > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>>>Thinking a little more - we dont really want variable names > > >>>>>> > > >>>>>> > > >translated > > > > > > > > >>>>>>anyway - the scripts will always be in English and using the > > >>>>>> > > >>>>>> > > >variables > > > > > > > > >>>>>>would be tough if they were actually translated to something else. > > >>>>>> > > >>>>>>gettext works on a bunch on languages as well as PHP but it is > really > > >>>>>>only working purely with strings. > > >>>>>> > > >>>>>>Phil > > >>>>>> > > >>>>>>On Sun, 2004-09-05 at 16:19, Jesse Peterson wrote: > > >>>>>> > > >>>>>> > > >>>>>> > > >>>>>> > > >>>>>> > > >>>>>> > > >>>>>>>>>That would be a great help re internationalization. > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>One question on this... I saw that you asked that this be done: > > >>>>>>> > > >>>>>>> > > >>>>>>> > > >>>>>>> > > >>>>>>> > > >>>>>>> > > >>>>>>> > > >>>>>>>>>echo "<P>A long string full of $NumberOfCharacters characters"; > > >>>>>>>>>would need to be re-written as: > > >>>>>>>>>echo '<P>' . _('A long string full of') . ' ' . > > >>>>>>>>> > > >>>>>>>>> > > >$NumberOfCharacters > > > > > > > > >>. > > >> > > >> > > >>>>>>>>> > > >>>>>>>>> > > >>>>' > > >>>> > > >>>> > > >>>> > > >>>> > > >>>>>>>>>' . _('characters'); > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>It makes perfect senses and is easy to follow. I also do not know > > >>>>>>> > > >>>>>>> > > >>>>>>> > > >>>>>>> > > >>>>gettext much at all. The root of what I am wondering is if php > > >>>> > > >>>> > > >evaluates > > > > > > > > >>a > > >> > > >> > > >>>>variable in a "num = $TheNum" style string before gettext translates > it > > >>>> > > >>>> > > >>or > > >> > > >> > > >>>>not. If not, it would probably make things a lot easier on potential > > >>>>translators to work with: > > >>>> > > >>>> > > >>>> > > >>>> > > >>>>>>> _("A long string full of $NumberOfCharacters characters"); > > >>>>>>>instead of: > > >>>>>>> _('A long string full of') . ' ' . $NumberOfCharacters . ' ' . > > >>>>>>> > > >>>>>>> > > >>>>>>> > > >>>>>>> > > >>>>_('characters'); > > >>>> > > >>>> > > >>>> > > >>>> > > >>>>>>>Luckily our code keeper is committed to readable code, so the > > >>>>>>> > > >>>>>>> > > >variable > > > > > > > > >>>>>>> > > >>>>>>> > > >>>>name should generally describe what it is. That would give a > translator > > >>>> > > >>>> > > >2 > > > > > > > > >>>>things - more full context to what they are translating and one less > > >>>>translation to do. I also know languages just enough to know that > > >>>> > > >>>> > > >piecing > > > > > > > > >>>>together english translations in the manner underway does not > > >>>> > > >>>> > > >necessarily > > > > > > > > >>>>produce coherent output. The more a message can be presented with > > >>>> > > >>>> > > >>context, > > >> > > >> > > >>>>the better the translation will be. > > >>>> > > >>>> > > >>>> > > >>>> > > >>>>>>>Just a thought - not sure how feasible it is... > > >>>>>>> > > >>>>>>> > > >>>>>>>jesse > > >>>>>>> > > >>>>>>> > > >>>>>>> > > >>>>>>>------------------------------------------------------- > > >>>>>>>This SF.Net email is sponsored by BEA Weblogic Workshop > > >>>>>>>FREE Java Enterprise J2EE developer tools! > > >>>>>>>Get your free copy of BEA WebLogic Workshop 8.1 today. > > >>>>>>>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > > >>>>>>>_______________________________________________ > > >>>>>>>Web-erp-developers mailing list > > >>>>>>>Web...@li... > > >>>>>>>https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > >>>>>>> > > >>>>>>> > > >>>>>>> > > >>>>>>> > > >>>>>>> > > >>>>>>> > > >>>>>>> > > >>>>>>------------------------------------------------------- > > >>>>>>This SF.Net email is sponsored by BEA Weblogic Workshop > > >>>>>>FREE Java Enterprise J2EE developer tools! > > >>>>>>Get your free copy of BEA WebLogic Workshop 8.1 today. > > >>>>>>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > > >>>>>>_______________________________________________ > > >>>>>>Web-erp-developers mailing list > > >>>>>>Web...@li... > > >>>>>>https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > >>>>>> > > >>>>>> > > >>>>>> > > >>>>>> > > >>>>>> > > >>>>>> > > >>>>>------------------------------------------------------- > > >>>>>This SF.Net email is sponsored by BEA Weblogic Workshop > > >>>>>FREE Java Enterprise J2EE developer tools! > > >>>>>Get your free copy of BEA WebLogic Workshop 8.1 today. > > >>>>>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > > >>>>>_______________________________________________ > > >>>>>Web-erp-developers mailing list > > >>>>>Web...@li... > > >>>>>https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>> > > >>>>------------------------------------------------------- > > >>>>This SF.Net email is sponsored by BEA Weblogic Workshop > > >>>>FREE Java Enterprise J2EE developer tools! > > >>>>Get your free copy of BEA WebLogic Workshop 8.1 today. > > >>>>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > > >>>>_______________________________________________ > > >>>>Web-erp-developers mailing list > > >>>>Web...@li... > > >>>>https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > >>>> > > >>>> > > >>>> > > >>>> > > >>> > > >>>------------------------------------------------------- > > >>>This SF.Net email is sponsored by BEA Weblogic Workshop > > >>>FREE Java Enterprise J2EE developer tools! > > >>>Get your free copy of BEA WebLogic Workshop 8.1 today. > > >>>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > > >>>_______________________________________________ > > >>>Web-erp-developers mailing list > > >>>Web...@li... > > >>>https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > >>> > > >>> > > >> > > >>------------------------------------------------------- > > >>This SF.Net email is sponsored by BEA Weblogic Workshop > > >>FREE Java Enterprise J2EE developer tools! > > >>Get your free copy of BEA WebLogic Workshop 8.1 today. > > >>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > > >>_______________________________________________ > > >>Web-erp-developers mailing list > > >>Web...@li... > > >>https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > >> > > >> > > >> > > > > > > > > > > > >------------------------------------------------------- > > >This SF.Net email is sponsored by BEA Weblogic Workshop > > >FREE Java Enterprise J2EE developer tools! > > >Get your free copy of BEA WebLogic Workshop 8.1 today. > > >http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > > >_______________________________________________ > > >Web-erp-developers mailing list > > >Web...@li... > > >https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > > > > > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by BEA Weblogic Workshop > > FREE Java Enterprise J2EE developer tools! > > Get your free copy of BEA WebLogic Workshop 8.1 today. > > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > > _______________________________________________ > > Web-erp-developers mailing list > > Web...@li... > > https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > _______________________________________________ > Web-erp-developers mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/web-erp-developers |
From: Stins, D. <DR...@Zi...> - 2004-09-05 21:01:47
|
----- Original Message ----- From: "skaill" <sk...@ro...> To: <web...@li...> Sent: Sunday, September 05, 2004 10:36 PM Subject: Re: [Web-erp-developers] file imports for serial items > Forcing the Declaration of all variables would eliminate many possible > problems/errors. > > If we compare the pros and cons I get: > > Pros > 1) We would need to evaluate how much further it gets the translation > compared to not using. > > 2) It would cut down on work to piece the strings and preserve the strings > in tact which would be more readable, however, I have always built my > strings in the way we're cutting them up anyway as opposed to embedding the > variables. I never liked the idea of the preprocessing of variables within > strings and also always thought it was more self-documenting having the > variables stick out through concatenation with the string pieces. I guess that most of WEB-ERP is mainly coded by this method. So this class does not contribute anything except when native gettext is not available (or did you allready have a solution for this?) > > Cons > 1) The possible slowdowns of using the class instead of built in php > processor gettext code > > 2) What's with the setVar? Does that mean we need to add setVars for every > var used in a string? That will be some more work. > > 3) Do the tolls for making the po's such as xgettext all work smoothly with > this enhancement? > > 4) If setVar is not done on a variable then I'm thinking what will happen is > the variable name with $ will appear instead of the variable's value. This > could get easily missed by various people at various times. > > 5) How stable and used is this class? > > Steve > > ----- Original Message ----- > From: "Stins, Dick" <DR...@Zi...> > To: <web...@li...> > Sent: Sunday, September 05, 2004 2:12 PM > Subject: Re: [Web-erp-developers] file imports for serial items > > > > Jesse, > > > > This package is nice. Only we need an extra step. "declare" all variables. > > But that's an advantage too because it's shows directly an error when you > > make some typing mistakes like "name" instead of "names". > > > > with best regards, > > > > Dick Stins > > > > ----- Original Message ----- > > From: "Jesse Peterson" <je...@st...> > > To: <web...@li...> > > Sent: Sunday, September 05, 2004 7:00 PM > > Subject: Re: [Web-erp-developers] file imports for serial items > > > > > > > I've done some testing and digging today and it would seem that there is > > > no way to do the translation w/ variables I was talking about without > > > either employing a wrapper class of sorts or using printf variable > > > positioning syntax that could be very confusing. > > > I did not test this, but it likely would be an easy class to drop in... > > > http://phptal.sourceforge.net/bagpack/GetText/class.GetText.html > > > It look like it is basically a wrapper to gettext... > > > > > > that would still require translators to be able to move around variables > > > and a little extra typing on our part... I think having vars written in > > > the ${varname} syntax would make it easier for a non-programmer, though. > > > I'm just thinking about how bad the translations may get chopping up > > > sentences... > > > > > > jesse > > > > > > > > > Daintrees wrote: > > > > > > >Well I didn't actually test that bit. > > > > > > > >We are actually using xgettext to extract all the strings from the > files > > > >that have strings inside the gettext function calls. xgettext wont > > extract > > > >strings that include variables inside them and with flagging > enthusisasm > > for > > > >multi-language - I don't want to have to take strings manually to the > > > >messages.po I want this created automatically using xgettext. > > > > > > > >There is a chance that your suggestion might work Jesse, its just that > if > > it > > > >does, it would involve a LOT more work and introduce more possible > causes > > of > > > >problems. Translators would have to know to keep the name of the > variable > > > >exactly the same and might not. > > > > > > > >Phil > > > > > > > > > > > >----- Original Message ----- > > > >From: "skaill" <sk...@ro...> > > > >To: <web...@li...> > > > >Sent: Sunday, September 05, 2004 6:00 PM > > > >Subject: Re: [Web-erp-developers] file imports for serial items > > > > > > > > > > > > > > > > > > > >>Ah. And since we don't want the variables hard code translated then > it > > > >>wouldn't do to translate the entire string. > > > >> > > > >>Steve > > > >> > > > >>----- Original Message ----- > > > >>From: "Jesse Peterson" <je...@st...> > > > >>To: <web...@li...> > > > >>Sent: Sunday, September 05, 2004 1:45 AM > > > >>Subject: Re: [Web-erp-developers] file imports for serial items > > > >> > > > >> > > > >> > > > >> > > > >>>php is interpreted in it's execution, but these functions occur > within > > > >>>the execution, so it was a crap shoot as to which way gettext is > > > >>>written. Phil has repsonded to say he tested and that gettext in fact > > > >>>does parse & interpret the string before matching it for translation. > > > >>> > > > >>>jesse > > > >>> > > > >>> > > > >>>skaill wrote: > > > >>> > > > >>> > > > >>> > > > >>>>I could be way off track but I'm thinking that PHP is interpreted, > not > > > >>>>compiled. Therefore, it does not know what to do with a string > until > > > >>>> > > > >>>> > > > >it > > > > > > > > > > > >>is > > > >> > > > >> > > > >>>>executing the function/command upon that string. For instance, the > > > >>>> > > > >>>> > > > >>function > > > >> > > > >> > > > >>>>could be to simply copy the string. This means you would want to > copy > > > >>>> > > > >>>> > > > >>"Hi > > > >> > > > >> > > > >>>>$UserID" as "Hi $UserID", not "Hi Tom". If so, it would be the echo > > > >>>> > > > >>>> > > > >that > > > > > > > > > > > >>>>indicates what to do with the string. Since the echo is executed > > after > > > >>>> > > > >>>> > > > >>the > > > >> > > > >> > > > >>>>gettext then the string passed to gettext would contain the variable > > > >>>> > > > >>>> > > > >name > > > > > > > > > > > >>>>and not the contents of the variable. > > > >>>> > > > >>>>Steve > > > >>>> > > > >>>>----- Original Message ----- > > > >>>>From: "Jesse Peterson" <je...@st...> > > > >>>>To: <web...@li...> > > > >>>>Sent: Sunday, September 05, 2004 12:57 AM > > > >>>>Subject: Re: [Web-erp-developers] file imports for serial items > > > >>>> > > > >>>> > > > >>>> > > > >>>> > > > >>>> > > > >>>> > > > >>>>>No, my thought was the translator would be told that things > starting > > > >>>>>with $ were a variable, usually a number, (and I suppose a > possible > > > >>>>>explanation of that) so they could just move them around in the > > > >>>>>translated string. I suppose a way to think of what I'm taking > about > > > >>>>> > > > >>>>> > > > >is > > > > > > > > > > > >>>>>an array keyed by a full string, including variable, that had > values > > > >>>>> > > > >>>>> > > > >of > > > > > > > > > > > >>>>>the translated string that should be used. > > > >>>>>Alas, as you said, it does not work like that with gettext - I > > > >>>>> > > > >>>>> > > > >supposed > > > > > > > > > > > >>>>>the 'smart' it is depends on how you might wish it to work ;) And > I > > > >>>>>wasn't just suggesting it work the shorter code, it was really for > > the > > > >>>>>more accurate translation to help make things look that much better > > in > > > >>>>>the eyes of others. Still, being able to attract the user base of > > most > > > >>>>>any language is a very good thing, so this project you guys have > > > >>>>>undertaken is quite admirable. Glad I can help. > > > >>>>> > > > >>>>>jesse > > > >>>>> > > > >>>>> > > > >>>>>Phil Daintree wrote: > > > >>>>> > > > >>>>> > > > >>>>> > > > >>>>> > > > >>>>> > > > >>>>>>Thinking a little more - we dont really want variable names > > > >>>>>> > > > >>>>>> > > > >translated > > > > > > > > > > > >>>>>>anyway - the scripts will always be in English and using the > > > >>>>>> > > > >>>>>> > > > >variables > > > > > > > > > > > >>>>>>would be tough if they were actually translated to something else. > > > >>>>>> > > > >>>>>>gettext works on a bunch on languages as well as PHP but it is > > really > > > >>>>>>only working purely with strings. > > > >>>>>> > > > >>>>>>Phil > > > >>>>>> > > > >>>>>>On Sun, 2004-09-05 at 16:19, Jesse Peterson wrote: > > > >>>>>> > > > >>>>>> > > > >>>>>> > > > >>>>>> > > > >>>>>> > > > >>>>>> > > > >>>>>>>>>That would be a great help re internationalization. > > > >>>>>>>>> > > > >>>>>>>>> > > > >>>>>>>>> > > > >>>>>>>>> > > > >>>>>>>>> > > > >>>>>>>>> > > > >>>>>>>One question on this... I saw that you asked that this be done: > > > >>>>>>> > > > >>>>>>> > > > >>>>>>> > > > >>>>>>> > > > >>>>>>> > > > >>>>>>> > > > >>>>>>> > > > >>>>>>>>>echo "<P>A long string full of $NumberOfCharacters characters"; > > > >>>>>>>>>would need to be re-written as: > > > >>>>>>>>>echo '<P>' . _('A long string full of') . ' ' . > > > >>>>>>>>> > > > >>>>>>>>> > > > >$NumberOfCharacters > > > > > > > > > > > >>. > > > >> > > > >> > > > >>>>>>>>> > > > >>>>>>>>> > > > >>>>' > > > >>>> > > > >>>> > > > >>>> > > > >>>> > > > >>>>>>>>>' . _('characters'); > > > >>>>>>>>> > > > >>>>>>>>> > > > >>>>>>>>> > > > >>>>>>>>> > > > >>>>>>>>> > > > >>>>>>>>> > > > >>>>>>>It makes perfect senses and is easy to follow. I also do not know > > > >>>>>>> > > > >>>>>>> > > > >>>>>>> > > > >>>>>>> > > > >>>>gettext much at all. The root of what I am wondering is if php > > > >>>> > > > >>>> > > > >evaluates > > > > > > > > > > > >>a > > > >> > > > >> > > > >>>>variable in a "num = $TheNum" style string before gettext translates > > it > > > >>>> > > > >>>> > > > >>or > > > >> > > > >> > > > >>>>not. If not, it would probably make things a lot easier on potential > > > >>>>translators to work with: > > > >>>> > > > >>>> > > > >>>> > > > >>>> > > > >>>>>>> _("A long string full of $NumberOfCharacters characters"); > > > >>>>>>>instead of: > > > >>>>>>> _('A long string full of') . ' ' . $NumberOfCharacters . ' ' . > > > >>>>>>> > > > >>>>>>> > > > >>>>>>> > > > >>>>>>> > > > >>>>_('characters'); > > > >>>> > > > >>>> > > > >>>> > > > >>>> > > > >>>>>>>Luckily our code keeper is committed to readable code, so the > > > >>>>>>> > > > >>>>>>> > > > >variable > > > > > > > > > > > >>>>>>> > > > >>>>>>> > > > >>>>name should generally describe what it is. That would give a > > translator > > > >>>> > > > >>>> > > > >2 > > > > > > > > > > > >>>>things - more full context to what they are translating and one less > > > >>>>translation to do. I also know languages just enough to know that > > > >>>> > > > >>>> > > > >piecing > > > > > > > > > > > >>>>together english translations in the manner underway does not > > > >>>> > > > >>>> > > > >necessarily > > > > > > > > > > > >>>>produce coherent output. The more a message can be presented with > > > >>>> > > > >>>> > > > >>context, > > > >> > > > >> > > > >>>>the better the translation will be. > > > >>>> > > > >>>> > > > >>>> > > > >>>> > > > >>>>>>>Just a thought - not sure how feasible it is... > > > >>>>>>> > > > >>>>>>> > > > >>>>>>>jesse > > > >>>>>>> > > > >>>>>>> > > > >>>>>>> > > > >>>>>>>------------------------------------------------------- > > > >>>>>>>This SF.Net email is sponsored by BEA Weblogic Workshop > > > >>>>>>>FREE Java Enterprise J2EE developer tools! > > > >>>>>>>Get your free copy of BEA WebLogic Workshop 8.1 today. > > > >>>>>>>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > > > >>>>>>>_______________________________________________ > > > >>>>>>>Web-erp-developers mailing list > > > >>>>>>>Web...@li... > > > >>>>>>>https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > >>>>>>> > > > >>>>>>> > > > >>>>>>> > > > >>>>>>> > > > >>>>>>> > > > >>>>>>> > > > >>>>>>> > > > >>>>>>------------------------------------------------------- > > > >>>>>>This SF.Net email is sponsored by BEA Weblogic Workshop > > > >>>>>>FREE Java Enterprise J2EE developer tools! > > > >>>>>>Get your free copy of BEA WebLogic Workshop 8.1 today. > > > >>>>>>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > > > >>>>>>_______________________________________________ > > > >>>>>>Web-erp-developers mailing list > > > >>>>>>Web...@li... > > > >>>>>>https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > >>>>>> > > > >>>>>> > > > >>>>>> > > > >>>>>> > > > >>>>>> > > > >>>>>> > > > >>>>>------------------------------------------------------- > > > >>>>>This SF.Net email is sponsored by BEA Weblogic Workshop > > > >>>>>FREE Java Enterprise J2EE developer tools! > > > >>>>>Get your free copy of BEA WebLogic Workshop 8.1 today. > > > >>>>>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > > > >>>>>_______________________________________________ > > > >>>>>Web-erp-developers mailing list > > > >>>>>Web...@li... > > > >>>>>https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > >>>>> > > > >>>>> > > > >>>>> > > > >>>>> > > > >>>> > > > >>>>------------------------------------------------------- > > > >>>>This SF.Net email is sponsored by BEA Weblogic Workshop > > > >>>>FREE Java Enterprise J2EE developer tools! > > > >>>>Get your free copy of BEA WebLogic Workshop 8.1 today. > > > >>>>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > > > >>>>_______________________________________________ > > > >>>>Web-erp-developers mailing list > > > >>>>Web...@li... > > > >>>>https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > >>>> > > > >>>> > > > >>>> > > > >>>> > > > >>> > > > >>>------------------------------------------------------- > > > >>>This SF.Net email is sponsored by BEA Weblogic Workshop > > > >>>FREE Java Enterprise J2EE developer tools! > > > >>>Get your free copy of BEA WebLogic Workshop 8.1 today. > > > >>>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > > > >>>_______________________________________________ > > > >>>Web-erp-developers mailing list > > > >>>Web...@li... > > > >>>https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > >>> > > > >>> > > > >> > > > >>------------------------------------------------------- > > > >>This SF.Net email is sponsored by BEA Weblogic Workshop > > > >>FREE Java Enterprise J2EE developer tools! > > > >>Get your free copy of BEA WebLogic Workshop 8.1 today. > > > >>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > > > >>_______________________________________________ > > > >>Web-erp-developers mailing list > > > >>Web...@li... > > > >>https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > >> > > > >> > > > >> > > > > > > > > > > > > > > > >------------------------------------------------------- > > > >This SF.Net email is sponsored by BEA Weblogic Workshop > > > >FREE Java Enterprise J2EE developer tools! > > > >Get your free copy of BEA WebLogic Workshop 8.1 today. > > > >http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > > > >_______________________________________________ > > > >Web-erp-developers mailing list > > > >Web...@li... > > > >https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by BEA Weblogic Workshop > > > FREE Java Enterprise J2EE developer tools! > > > Get your free copy of BEA WebLogic Workshop 8.1 today. > > > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > > > _______________________________________________ > > > Web-erp-developers mailing list > > > Web...@li... > > > https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by BEA Weblogic Workshop > > FREE Java Enterprise J2EE developer tools! > > Get your free copy of BEA WebLogic Workshop 8.1 today. > > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > > _______________________________________________ > > Web-erp-developers mailing list > > Web...@li... > > https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > _______________________________________________ > Web-erp-developers mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/web-erp-developers |
From: skaill <sk...@ro...> - 2004-09-05 21:28:13
|
No solution for when gettext is not native except passing through the English. Good point because we need something like this even without the variable issue. Steve ----- Original Message ----- From: "Stins, Dick" <DR...@Zi...> To: <web...@li...> Sent: Sunday, September 05, 2004 5:06 PM Subject: Re: [Web-erp-developers] file imports for serial items > > ----- Original Message ----- > From: "skaill" <sk...@ro...> > To: <web...@li...> > Sent: Sunday, September 05, 2004 10:36 PM > Subject: Re: [Web-erp-developers] file imports for serial items > > > > Forcing the Declaration of all variables would eliminate many possible > > problems/errors. > > > > If we compare the pros and cons I get: > > > > Pros > > 1) We would need to evaluate how much further it gets the translation > > compared to not using. > > > > 2) It would cut down on work to piece the strings and preserve the strings > > in tact which would be more readable, however, I have always built my > > strings in the way we're cutting them up anyway as opposed to embedding > the > > variables. I never liked the idea of the preprocessing of variables > within > > strings and also always thought it was more self-documenting having the > > variables stick out through concatenation with the string pieces. > > I guess that most of WEB-ERP is mainly coded by this method. So this class > does not contribute anything except when native gettext is not available (or > did you allready have a solution for this?) > > > > > Cons > > 1) The possible slowdowns of using the class instead of built in php > > processor gettext code > > > > 2) What's with the setVar? Does that mean we need to add setVars for > every > > var used in a string? That will be some more work. > > > > 3) Do the tolls for making the po's such as xgettext all work smoothly > with > > this enhancement? > > > > 4) If setVar is not done on a variable then I'm thinking what will happen > is > > the variable name with $ will appear instead of the variable's value. > This > > could get easily missed by various people at various times. > > > > 5) How stable and used is this class? > > > > Steve > > > > ----- Original Message ----- > > From: "Stins, Dick" <DR...@Zi...> > > To: <web...@li...> > > Sent: Sunday, September 05, 2004 2:12 PM > > Subject: Re: [Web-erp-developers] file imports for serial items > > > > > > > Jesse, > > > > > > This package is nice. Only we need an extra step. "declare" all > variables. > > > But that's an advantage too because it's shows directly an error when > you > > > make some typing mistakes like "name" instead of "names". > > > > > > with best regards, > > > > > > Dick Stins > > > > > > ----- Original Message ----- > > > From: "Jesse Peterson" <je...@st...> > > > To: <web...@li...> > > > Sent: Sunday, September 05, 2004 7:00 PM > > > Subject: Re: [Web-erp-developers] file imports for serial items > > > > > > > > > > I've done some testing and digging today and it would seem that there > is > > > > no way to do the translation w/ variables I was talking about without > > > > either employing a wrapper class of sorts or using printf variable > > > > positioning syntax that could be very confusing. > > > > I did not test this, but it likely would be an easy class to drop > in... > > > > http://phptal.sourceforge.net/bagpack/GetText/class.GetText.html > > > > It look like it is basically a wrapper to gettext... > > > > > > > > that would still require translators to be able to move around > variables > > > > and a little extra typing on our part... I think having vars written > in > > > > the ${varname} syntax would make it easier for a non-programmer, > though. > > > > I'm just thinking about how bad the translations may get chopping up > > > > sentences... > > > > > > > > jesse > > > > > > > > > > > > Daintrees wrote: > > > > > > > > >Well I didn't actually test that bit. > > > > > > > > > >We are actually using xgettext to extract all the strings from the > > files > > > > >that have strings inside the gettext function calls. xgettext wont > > > extract > > > > >strings that include variables inside them and with flagging > > enthusisasm > > > for > > > > >multi-language - I don't want to have to take strings manually to the > > > > >messages.po I want this created automatically using xgettext. > > > > > > > > > >There is a chance that your suggestion might work Jesse, its just > that > > if > > > it > > > > >does, it would involve a LOT more work and introduce more possible > > causes > > > of > > > > >problems. Translators would have to know to keep the name of the > > variable > > > > >exactly the same and might not. > > > > > > > > > >Phil > > > > > > > > > > > > > > >----- Original Message ----- > > > > >From: "skaill" <sk...@ro...> > > > > >To: <web...@li...> > > > > >Sent: Sunday, September 05, 2004 6:00 PM > > > > >Subject: Re: [Web-erp-developers] file imports for serial items > > > > > > > > > > > > > > > > > > > > > > > > >>Ah. And since we don't want the variables hard code translated then > > it > > > > >>wouldn't do to translate the entire string. > > > > >> > > > > >>Steve > > > > >> > > > > >>----- Original Message ----- > > > > >>From: "Jesse Peterson" <je...@st...> > > > > >>To: <web...@li...> > > > > >>Sent: Sunday, September 05, 2004 1:45 AM > > > > >>Subject: Re: [Web-erp-developers] file imports for serial items > > > > >> > > > > >> > > > > >> > > > > >> > > > > >>>php is interpreted in it's execution, but these functions occur > > within > > > > >>>the execution, so it was a crap shoot as to which way gettext is > > > > >>>written. Phil has repsonded to say he tested and that gettext in > fact > > > > >>>does parse & interpret the string before matching it for > translation. > > > > >>> > > > > >>>jesse > > > > >>> > > > > >>> > > > > >>>skaill wrote: > > > > >>> > > > > >>> > > > > >>> > > > > >>>>I could be way off track but I'm thinking that PHP is interpreted, > > not > > > > >>>>compiled. Therefore, it does not know what to do with a string > > until > > > > >>>> > > > > >>>> > > > > >it > > > > > > > > > > > > > > >>is > > > > >> > > > > >> > > > > >>>>executing the function/command upon that string. For instance, > the > > > > >>>> > > > > >>>> > > > > >>function > > > > >> > > > > >> > > > > >>>>could be to simply copy the string. This means you would want to > > copy > > > > >>>> > > > > >>>> > > > > >>"Hi > > > > >> > > > > >> > > > > >>>>$UserID" as "Hi $UserID", not "Hi Tom". If so, it would be the > echo > > > > >>>> > > > > >>>> > > > > >that > > > > > > > > > > > > > > >>>>indicates what to do with the string. Since the echo is executed > > > after > > > > >>>> > > > > >>>> > > > > >>the > > > > >> > > > > >> > > > > >>>>gettext then the string passed to gettext would contain the > variable > > > > >>>> > > > > >>>> > > > > >name > > > > > > > > > > > > > > >>>>and not the contents of the variable. > > > > >>>> > > > > >>>>Steve > > > > >>>> > > > > >>>>----- Original Message ----- > > > > >>>>From: "Jesse Peterson" <je...@st...> > > > > >>>>To: <web...@li...> > > > > >>>>Sent: Sunday, September 05, 2004 12:57 AM > > > > >>>>Subject: Re: [Web-erp-developers] file imports for serial items > > > > >>>> > > > > >>>> > > > > >>>> > > > > >>>> > > > > >>>> > > > > >>>> > > > > >>>>>No, my thought was the translator would be told that things > > starting > > > > >>>>>with $ were a variable, usually a number, (and I suppose a > > possible > > > > >>>>>explanation of that) so they could just move them around in the > > > > >>>>>translated string. I suppose a way to think of what I'm taking > > about > > > > >>>>> > > > > >>>>> > > > > >is > > > > > > > > > > > > > > >>>>>an array keyed by a full string, including variable, that had > > values > > > > >>>>> > > > > >>>>> > > > > >of > > > > > > > > > > > > > > >>>>>the translated string that should be used. > > > > >>>>>Alas, as you said, it does not work like that with gettext - I > > > > >>>>> > > > > >>>>> > > > > >supposed > > > > > > > > > > > > > > >>>>>the 'smart' it is depends on how you might wish it to work ;) > And > > I > > > > >>>>>wasn't just suggesting it work the shorter code, it was really > for > > > the > > > > >>>>>more accurate translation to help make things look that much > better > > > in > > > > >>>>>the eyes of others. Still, being able to attract the user base of > > > most > > > > >>>>>any language is a very good thing, so this project you guys have > > > > >>>>>undertaken is quite admirable. Glad I can help. > > > > >>>>> > > > > >>>>>jesse > > > > >>>>> > > > > >>>>> > > > > >>>>>Phil Daintree wrote: > > > > >>>>> > > > > >>>>> > > > > >>>>> > > > > >>>>> > > > > >>>>> > > > > >>>>>>Thinking a little more - we dont really want variable names > > > > >>>>>> > > > > >>>>>> > > > > >translated > > > > > > > > > > > > > > >>>>>>anyway - the scripts will always be in English and using the > > > > >>>>>> > > > > >>>>>> > > > > >variables > > > > > > > > > > > > > > >>>>>>would be tough if they were actually translated to something > else. > > > > >>>>>> > > > > >>>>>>gettext works on a bunch on languages as well as PHP but it is > > > really > > > > >>>>>>only working purely with strings. > > > > >>>>>> > > > > >>>>>>Phil > > > > >>>>>> > > > > >>>>>>On Sun, 2004-09-05 at 16:19, Jesse Peterson wrote: > > > > >>>>>> > > > > >>>>>> > > > > >>>>>> > > > > >>>>>> > > > > >>>>>> > > > > >>>>>> > > > > >>>>>>>>>That would be a great help re internationalization. > > > > >>>>>>>>> > > > > >>>>>>>>> > > > > >>>>>>>>> > > > > >>>>>>>>> > > > > >>>>>>>>> > > > > >>>>>>>>> > > > > >>>>>>>One question on this... I saw that you asked that this be done: > > > > >>>>>>> > > > > >>>>>>> > > > > >>>>>>> > > > > >>>>>>> > > > > >>>>>>> > > > > >>>>>>> > > > > >>>>>>> > > > > >>>>>>>>>echo "<P>A long string full of $NumberOfCharacters > characters"; > > > > >>>>>>>>>would need to be re-written as: > > > > >>>>>>>>>echo '<P>' . _('A long string full of') . ' ' . > > > > >>>>>>>>> > > > > >>>>>>>>> > > > > >$NumberOfCharacters > > > > > > > > > > > > > > >>. > > > > >> > > > > >> > > > > >>>>>>>>> > > > > >>>>>>>>> > > > > >>>>' > > > > >>>> > > > > >>>> > > > > >>>> > > > > >>>> > > > > >>>>>>>>>' . _('characters'); > > > > >>>>>>>>> > > > > >>>>>>>>> > > > > >>>>>>>>> > > > > >>>>>>>>> > > > > >>>>>>>>> > > > > >>>>>>>>> > > > > >>>>>>>It makes perfect senses and is easy to follow. I also do not > know > > > > >>>>>>> > > > > >>>>>>> > > > > >>>>>>> > > > > >>>>>>> > > > > >>>>gettext much at all. The root of what I am wondering is if php > > > > >>>> > > > > >>>> > > > > >evaluates > > > > > > > > > > > > > > >>a > > > > >> > > > > >> > > > > >>>>variable in a "num = $TheNum" style string before gettext > translates > > > it > > > > >>>> > > > > >>>> > > > > >>or > > > > >> > > > > >> > > > > >>>>not. If not, it would probably make things a lot easier on > potential > > > > >>>>translators to work with: > > > > >>>> > > > > >>>> > > > > >>>> > > > > >>>> > > > > >>>>>>> _("A long string full of $NumberOfCharacters characters"); > > > > >>>>>>>instead of: > > > > >>>>>>> _('A long string full of') . ' ' . $NumberOfCharacters . ' ' . > > > > >>>>>>> > > > > >>>>>>> > > > > >>>>>>> > > > > >>>>>>> > > > > >>>>_('characters'); > > > > >>>> > > > > >>>> > > > > >>>> > > > > >>>> > > > > >>>>>>>Luckily our code keeper is committed to readable code, so the > > > > >>>>>>> > > > > >>>>>>> > > > > >variable > > > > > > > > > > > > > > >>>>>>> > > > > >>>>>>> > > > > >>>>name should generally describe what it is. That would give a > > > translator > > > > >>>> > > > > >>>> > > > > >2 > > > > > > > > > > > > > > >>>>things - more full context to what they are translating and one > less > > > > >>>>translation to do. I also know languages just enough to know that > > > > >>>> > > > > >>>> > > > > >piecing > > > > > > > > > > > > > > >>>>together english translations in the manner underway does not > > > > >>>> > > > > >>>> > > > > >necessarily > > > > > > > > > > > > > > >>>>produce coherent output. The more a message can be presented with > > > > >>>> > > > > >>>> > > > > >>context, > > > > >> > > > > >> > > > > >>>>the better the translation will be. > > > > >>>> > > > > >>>> > > > > >>>> > > > > >>>> > > > > >>>>>>>Just a thought - not sure how feasible it is... > > > > >>>>>>> > > > > >>>>>>> > > > > >>>>>>>jesse > > > > >>>>>>> > > > > >>>>>>> > > > > >>>>>>> > > > > >>>>>>>------------------------------------------------------- > > > > >>>>>>>This SF.Net email is sponsored by BEA Weblogic Workshop > > > > >>>>>>>FREE Java Enterprise J2EE developer tools! > > > > >>>>>>>Get your free copy of BEA WebLogic Workshop 8.1 today. > > > > >>>>>>>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > > > > >>>>>>>_______________________________________________ > > > > >>>>>>>Web-erp-developers mailing list > > > > >>>>>>>Web...@li... > > > > >>>>>>>https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > > >>>>>>> > > > > >>>>>>> > > > > >>>>>>> > > > > >>>>>>> > > > > >>>>>>> > > > > >>>>>>> > > > > >>>>>>> > > > > >>>>>>------------------------------------------------------- > > > > >>>>>>This SF.Net email is sponsored by BEA Weblogic Workshop > > > > >>>>>>FREE Java Enterprise J2EE developer tools! > > > > >>>>>>Get your free copy of BEA WebLogic Workshop 8.1 today. > > > > >>>>>>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > > > > >>>>>>_______________________________________________ > > > > >>>>>>Web-erp-developers mailing list > > > > >>>>>>Web...@li... > > > > >>>>>>https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > > >>>>>> > > > > >>>>>> > > > > >>>>>> > > > > >>>>>> > > > > >>>>>> > > > > >>>>>> > > > > >>>>>------------------------------------------------------- > > > > >>>>>This SF.Net email is sponsored by BEA Weblogic Workshop > > > > >>>>>FREE Java Enterprise J2EE developer tools! > > > > >>>>>Get your free copy of BEA WebLogic Workshop 8.1 today. > > > > >>>>>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > > > > >>>>>_______________________________________________ > > > > >>>>>Web-erp-developers mailing list > > > > >>>>>Web...@li... > > > > >>>>>https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > > >>>>> > > > > >>>>> > > > > >>>>> > > > > >>>>> > > > > >>>> > > > > >>>>------------------------------------------------------- > > > > >>>>This SF.Net email is sponsored by BEA Weblogic Workshop > > > > >>>>FREE Java Enterprise J2EE developer tools! > > > > >>>>Get your free copy of BEA WebLogic Workshop 8.1 today. > > > > >>>>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > > > > >>>>_______________________________________________ > > > > >>>>Web-erp-developers mailing list > > > > >>>>Web...@li... > > > > >>>>https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > > >>>> > > > > >>>> > > > > >>>> > > > > >>>> > > > > >>> > > > > >>>------------------------------------------------------- > > > > >>>This SF.Net email is sponsored by BEA Weblogic Workshop > > > > >>>FREE Java Enterprise J2EE developer tools! > > > > >>>Get your free copy of BEA WebLogic Workshop 8.1 today. > > > > >>>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > > > > >>>_______________________________________________ > > > > >>>Web-erp-developers mailing list > > > > >>>Web...@li... > > > > >>>https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > > >>> > > > > >>> > > > > >> > > > > >>------------------------------------------------------- > > > > >>This SF.Net email is sponsored by BEA Weblogic Workshop > > > > >>FREE Java Enterprise J2EE developer tools! > > > > >>Get your free copy of BEA WebLogic Workshop 8.1 today. > > > > >>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > > > > >>_______________________________________________ > > > > >>Web-erp-developers mailing list > > > > >>Web...@li... > > > > >>https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > > >> > > > > >> > > > > >> > > > > > > > > > > > > > > > > > > > >------------------------------------------------------- > > > > >This SF.Net email is sponsored by BEA Weblogic Workshop > > > > >FREE Java Enterprise J2EE developer tools! > > > > >Get your free copy of BEA WebLogic Workshop 8.1 today. > > > > >http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > > > > >_______________________________________________ > > > > >Web-erp-developers mailing list > > > > >Web...@li... > > > > >https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > > This SF.Net email is sponsored by BEA Weblogic Workshop > > > > FREE Java Enterprise J2EE developer tools! > > > > Get your free copy of BEA WebLogic Workshop 8.1 today. > > > > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > > > > _______________________________________________ > > > > Web-erp-developers mailing list > > > > Web...@li... > > > > https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > > > > > > > > > > > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by BEA Weblogic Workshop > > > FREE Java Enterprise J2EE developer tools! > > > Get your free copy of BEA WebLogic Workshop 8.1 today. > > > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > > > _______________________________________________ > > > Web-erp-developers mailing list > > > Web...@li... > > > https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by BEA Weblogic Workshop > > FREE Java Enterprise J2EE developer tools! > > Get your free copy of BEA WebLogic Workshop 8.1 today. > > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > > _______________________________________________ > > Web-erp-developers mailing list > > Web...@li... > > https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > _______________________________________________ > Web-erp-developers mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/web-erp-developers |
From: Jesse P. <je...@st...> - 2004-09-05 21:18:16
|
>Pros >1) We would need to evaluate how much further it gets the translation >compared to not using. > > I see it as allowing more accurate string/message translations however it will require a little more code for the developers and a little extra instruction to a translator (how to move around variables). >Cons >1) The possible slowdowns of using the class instead of built in php >processor gettext code > > This class allows use of php's built-in gettext libraries if they are available. This is important as I am pretty sure we could inter-mix it's use with the standard gettext function, therefor only having to use it when we needed a string with vars in it. >2) What's with the setVar? Does that mean we need to add setVars for every >var used in a string? That will be some more work. > > > Yes, and yes it will be a little more work. >3) Do the tolls for making the po's such as xgettext all work smoothly with >this enhancement? > > huh? It appears to use the same POs gen'd by xgettext if that's what you are asking about. >4) If setVar is not done on a variable then I'm thinking what will happen is >the variable name with $ will appear instead of the variable's value. This >could get easily missed by various people at various times. > >5) How stable and used is this class? > > They use it and claim it is stable enough for their use. We will have to test it/read docs to determine it's how it functions when mis-used. The main point here, though, is that I haven't seen a more simple way to get things fully translated (as opposed to in pieces) than a wrapper like this or through complicated (s)printfs. If others think the pieced together translations will suffice, then so be it. I just would hate to have gone through this trouble and find later that people really can't stand the translations that have been done and to realize that with a little extra work at the beginning they could have been better. jesse |
From: skaill <sk...@ro...> - 2004-09-05 21:38:02
|
Cons 1) Then there is basically no slowdown issue. That's good. 3) I meant to type tools, not tolls. I'm asking if all the tools for gettext will work perfectly with embedded variables. I'm thinking they would. Your suggestion is good and timely, Jesse, I guess I'm playing devil's advocate to explore all the questions ;) How much will it enhance what we're doing versus how much extra work, learning and potential for problems. Forget the printf's in my opinion! Steve ----- Original Message ----- From: "Jesse Peterson" <je...@st...> To: <web...@li...> Sent: Sunday, September 05, 2004 5:18 PM Subject: Re: [Web-erp-developers] file imports for serial items > > >Pros > >1) We would need to evaluate how much further it gets the translation > >compared to not using. > > > > > I see it as allowing more accurate string/message translations however > it will require a little more code for the developers and a little extra > instruction to a translator (how to move around variables). > > >Cons > >1) The possible slowdowns of using the class instead of built in php > >processor gettext code > > > > > This class allows use of php's built-in gettext libraries if they are > available. This is important as I am pretty sure we could inter-mix it's > use with the standard gettext function, therefor only having to use it > when we needed a string with vars in it. > > >2) What's with the setVar? Does that mean we need to add setVars for every > >var used in a string? That will be some more work. > > > > > > > Yes, and yes it will be a little more work. > > >3) Do the tolls for making the po's such as xgettext all work smoothly with > >this enhancement? > > > > > huh? It appears to use the same POs gen'd by xgettext if that's what you > are asking about. > > >4) If setVar is not done on a variable then I'm thinking what will happen is > >the variable name with $ will appear instead of the variable's value. This > >could get easily missed by various people at various times. > > > >5) How stable and used is this class? > > > > > They use it and claim it is stable enough for their use. We will have to > test it/read docs to determine it's how it functions when mis-used. > > The main point here, though, is that I haven't seen a more simple way to > get things fully translated (as opposed to in pieces) than a wrapper > like this or through complicated (s)printfs. If others think the pieced > together translations will suffice, then so be it. I just would hate to > have gone through this trouble and find later that people really can't > stand the translations that have been done and to realize that with a > little extra work at the beginning they could have been better. > > jesse > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > _______________________________________________ > Web-erp-developers mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/web-erp-developers |
From: Daintrees <p.d...@pa...> - 2004-09-06 01:09:32
|
Yes this is a good thought. The saving grace is that variables are very rarely used inside strings. Perhaps I am lazy, but I really don't see the need to go to great lengths for the 2 or 3 instances of where this happens. The fall back where gettext is not installed on the local server is to create a function that just returns the english string. Translated environments thus need gettext installed. I understand that gettext is pretty widely available on most web-hosts. It is widely used and tested in many environments. I am keen to stick with tried and true. Phil ----- Original Message ----- From: "Jesse Peterson" <je...@st...> To: <web...@li...> Sent: Monday, September 06, 2004 9:18 AM Subject: Re: [Web-erp-developers] file imports for serial items > > >Pros > >1) We would need to evaluate how much further it gets the translation > >compared to not using. > > > > > I see it as allowing more accurate string/message translations however > it will require a little more code for the developers and a little extra > instruction to a translator (how to move around variables). > > >Cons > >1) The possible slowdowns of using the class instead of built in php > >processor gettext code > > > > > This class allows use of php's built-in gettext libraries if they are > available. This is important as I am pretty sure we could inter-mix it's > use with the standard gettext function, therefor only having to use it > when we needed a string with vars in it. > > >2) What's with the setVar? Does that mean we need to add setVars for every > >var used in a string? That will be some more work. > > > > > > > Yes, and yes it will be a little more work. > > >3) Do the tolls for making the po's such as xgettext all work smoothly with > >this enhancement? > > > > > huh? It appears to use the same POs gen'd by xgettext if that's what you > are asking about. > > >4) If setVar is not done on a variable then I'm thinking what will happen is > >the variable name with $ will appear instead of the variable's value. This > >could get easily missed by various people at various times. > > > >5) How stable and used is this class? > > > > > They use it and claim it is stable enough for their use. We will have to > test it/read docs to determine it's how it functions when mis-used. > > The main point here, though, is that I haven't seen a more simple way to > get things fully translated (as opposed to in pieces) than a wrapper > like this or through complicated (s)printfs. If others think the pieced > together translations will suffice, then so be it. I just would hate to > have gone through this trouble and find later that people really can't > stand the translations that have been done and to realize that with a > little extra work at the beginning they could have been better. > > jesse > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > _______________________________________________ > Web-erp-developers mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/web-erp-developers > |
From: Jesse P. <je...@st...> - 2004-09-06 03:27:44
|
I'd have to say it happens more than rarely. Again, my big worry is choppy, nonsensical translations putting off potential users. I also believe that using a wrapper class, including the one I mentioned, would allow us to *only* use it when necessary and the _('xxx') to be used every other time. Maybe we need to get some people doing or that can do translations to take a look and see what effect it may have. It's just something that would be nice to get right the first time since there are well over 150 scripts that have to follow which ever way we determine as best. jesse Daintrees wrote: >Yes this is a good thought. > >The saving grace is that variables are very rarely used inside strings. >Perhaps I am lazy, but I really don't see the need to go to great lengths >for the 2 or 3 instances of where this happens. > >The fall back where gettext is not installed on the local server is to >create a function that just returns the english string. Translated >environments thus need gettext installed. I understand that gettext is >pretty widely available on most web-hosts. It is widely used and tested in >many environments. I am keen to stick with tried and true. > >Phil > >----- Original Message ----- >From: "Jesse Peterson" <je...@st...> >To: <web...@li...> >Sent: Monday, September 06, 2004 9:18 AM >Subject: Re: [Web-erp-developers] file imports for serial items > > > > >>>Pros >>>1) We would need to evaluate how much further it gets the translation >>>compared to not using. >>> >>> >>> >>> >>I see it as allowing more accurate string/message translations however >>it will require a little more code for the developers and a little extra >>instruction to a translator (how to move around variables). >> >> >> >>>Cons >>>1) The possible slowdowns of using the class instead of built in php >>>processor gettext code >>> >>> >>> >>> >>This class allows use of php's built-in gettext libraries if they are >>available. This is important as I am pretty sure we could inter-mix it's >>use with the standard gettext function, therefor only having to use it >>when we needed a string with vars in it. >> >> >> >>>2) What's with the setVar? Does that mean we need to add setVars for >>> >>> >every > > >>>var used in a string? That will be some more work. >>> >>> >>> >>> >>> >>Yes, and yes it will be a little more work. >> >> >> >>>3) Do the tolls for making the po's such as xgettext all work smoothly >>> >>> >with > > >>>this enhancement? >>> >>> >>> >>> >>huh? It appears to use the same POs gen'd by xgettext if that's what you >>are asking about. >> >> >> >>>4) If setVar is not done on a variable then I'm thinking what will happen >>> >>> >is > > >>>the variable name with $ will appear instead of the variable's value. >>> >>> >This > > >>>could get easily missed by various people at various times. >>> >>>5) How stable and used is this class? >>> >>> >>> >>> >>They use it and claim it is stable enough for their use. We will have to >>test it/read docs to determine it's how it functions when mis-used. >> >>The main point here, though, is that I haven't seen a more simple way to >>get things fully translated (as opposed to in pieces) than a wrapper >>like this or through complicated (s)printfs. If others think the pieced >>together translations will suffice, then so be it. I just would hate to >>have gone through this trouble and find later that people really can't >>stand the translations that have been done and to realize that with a >>little extra work at the beginning they could have been better. >> >>jesse >> >> >> >> >> >>------------------------------------------------------- >>This SF.Net email is sponsored by BEA Weblogic Workshop >>FREE Java Enterprise J2EE developer tools! >>Get your free copy of BEA WebLogic Workshop 8.1 today. >>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click >>_______________________________________________ >>Web-erp-developers mailing list >>Web...@li... >>https://lists.sourceforge.net/lists/listinfo/web-erp-developers >> >> >> > > > >------------------------------------------------------- >This SF.Net email is sponsored by BEA Weblogic Workshop >FREE Java Enterprise J2EE developer tools! >Get your free copy of BEA WebLogic Workshop 8.1 today. >http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click >_______________________________________________ >Web-erp-developers mailing list >Web...@li... >https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > |
From: skaill <sk...@ro...> - 2004-09-07 23:00:58
|
I think it would be nice to include a software based gettext for those who don't have it installed with php. There are several reasons they may not have it installed and may not be able to do so. I believe there are some software based gettext replicas around and possibly the one Jesse is suggesting is the best. Plus it does give the opportunity in the future to do the embedded variables if we so desire down the road, even if not now. I think the important reasons for staying on the current path are: 1) We've found the standard tools and method. We know it is widely used and works. We know others have experience with it. 2) We have checked it all out to know what we're doing 3) It is not too complicated for everyone. Everyone seems to readily understand what to do which means more help too. 4) We are already down that path So maybe it's better to continue that path. There's no reason in the future why we can't do round two where we change the strings back into one piece. Granted Jesse is right that it is more work. I think several systems on the market do not go to the extent of translating with embedded variables so having the language expressed poorly in some messages is not a necessity but an advantage that could become a necessity in the future. Either way it would be nice to have eventually. Steve ----- Original Message ----- From: "Daintrees" <p.d...@pa...> To: <web...@li...> Sent: Sunday, September 05, 2004 9:11 PM Subject: Re: [Web-erp-developers] file imports for serial items > Yes this is a good thought. > > The saving grace is that variables are very rarely used inside strings. > Perhaps I am lazy, but I really don't see the need to go to great lengths > for the 2 or 3 instances of where this happens. > > The fall back where gettext is not installed on the local server is to > create a function that just returns the english string. Translated > environments thus need gettext installed. I understand that gettext is > pretty widely available on most web-hosts. It is widely used and tested in > many environments. I am keen to stick with tried and true. > > Phil > > ----- Original Message ----- > From: "Jesse Peterson" <je...@st...> > To: <web...@li...> > Sent: Monday, September 06, 2004 9:18 AM > Subject: Re: [Web-erp-developers] file imports for serial items > > > > > > >Pros > > >1) We would need to evaluate how much further it gets the translation > > >compared to not using. > > > > > > > > I see it as allowing more accurate string/message translations however > > it will require a little more code for the developers and a little extra > > instruction to a translator (how to move around variables). > > > > >Cons > > >1) The possible slowdowns of using the class instead of built in php > > >processor gettext code > > > > > > > > This class allows use of php's built-in gettext libraries if they are > > available. This is important as I am pretty sure we could inter-mix it's > > use with the standard gettext function, therefor only having to use it > > when we needed a string with vars in it. > > > > >2) What's with the setVar? Does that mean we need to add setVars for > every > > >var used in a string? That will be some more work. > > > > > > > > > > > Yes, and yes it will be a little more work. > > > > >3) Do the tolls for making the po's such as xgettext all work smoothly > with > > >this enhancement? > > > > > > > > huh? It appears to use the same POs gen'd by xgettext if that's what you > > are asking about. > > > > >4) If setVar is not done on a variable then I'm thinking what will happen > is > > >the variable name with $ will appear instead of the variable's value. > This > > >could get easily missed by various people at various times. > > > > > >5) How stable and used is this class? > > > > > > > > They use it and claim it is stable enough for their use. We will have to > > test it/read docs to determine it's how it functions when mis-used. > > > > The main point here, though, is that I haven't seen a more simple way to > > get things fully translated (as opposed to in pieces) than a wrapper > > like this or through complicated (s)printfs. If others think the pieced > > together translations will suffice, then so be it. I just would hate to > > have gone through this trouble and find later that people really can't > > stand the translations that have been done and to realize that with a > > little extra work at the beginning they could have been better. > > > > jesse > > > > > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by BEA Weblogic Workshop > > FREE Java Enterprise J2EE developer tools! > > Get your free copy of BEA WebLogic Workshop 8.1 today. > > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > > _______________________________________________ > > Web-erp-developers mailing list > > Web...@li... > > https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > _______________________________________________ > Web-erp-developers mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/web-erp-developers |
From: Phil D. <we...@pa...> - 2004-09-05 02:55:35
|
I have it working in all scripts to my knowelege albeit I have not tested the file input stuff. Phil On Sun, 2004-09-05 at 10:13, Jesse Peterson wrote: > Phil, > I've made it back around to fixing things... I just pulled the current > cvs (and realized exactly how long it'd been since I did that). First > things I noticed is that the file upload in GoodsReceivedControlled.php > is not working. In the last list message I saw about this stuff you > mentioned that InputSerialItems.php was causing problems in some scripts... > I'm going to start poking around and see what's up - if I missed > something (like you've globally disabled file stuff somehow) , let me > know where it stands so I can start mucking around. While I'm at it I'll > see if I can remember to make the changes for internationalization that > you guys have been discussing. > > > jesse > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > _______________________________________________ > Web-erp-developers mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/web-erp-developers > |
From: Jesse P. <je...@st...> - 2004-09-05 03:49:03
|
Good to know other scripts should be working. I did send a message to say I found that my setup did not work till I added the 'enctype' FORM var - that's with a pretty standard php/apache/linux install and both IE & Mozilla clients. I can't imagine including it would break anything else that may be working now. jesse Phil Daintree wrote: >I have it working in all scripts to my knowelege albeit I have not >tested the file input stuff. > >Phil > >On Sun, 2004-09-05 at 10:13, Jesse Peterson wrote: > > >>Phil, >>I've made it back around to fixing things... I just pulled the current >>cvs (and realized exactly how long it'd been since I did that). First >>things I noticed is that the file upload in GoodsReceivedControlled.php >>is not working. In the last list message I saw about this stuff you >>mentioned that InputSerialItems.php was causing problems in some scripts... >>I'm going to start poking around and see what's up - if I missed >>something (like you've globally disabled file stuff somehow) , let me >>know where it stands so I can start mucking around. While I'm at it I'll >>see if I can remember to make the changes for internationalization that >>you guys have been discussing. >> >> >>jesse >> >> >>------------------------------------------------------- >>This SF.Net email is sponsored by BEA Weblogic Workshop >>FREE Java Enterprise J2EE developer tools! >>Get your free copy of BEA WebLogic Workshop 8.1 today. >>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click >>_______________________________________________ >>Web-erp-developers mailing list >>Web...@li... >>https://lists.sourceforge.net/lists/listinfo/web-erp-developers >> >> >> > > > >------------------------------------------------------- >This SF.Net email is sponsored by BEA Weblogic Workshop >FREE Java Enterprise J2EE developer tools! >Get your free copy of BEA WebLogic Workshop 8.1 today. >http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click >_______________________________________________ >Web-erp-developers mailing list >Web...@li... >https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > |
From: Phil D. <we...@pa...> - 2004-09-05 04:44:04
|
On Sun, 2004-09-05 at 16:19, Jesse Peterson wrote: > It makes perfect senses and is easy to follow. I also do not know gettext much at all. The root of what I am wondering is if php evaluates a variable in a "num = $TheNum" style string before gettext translates it or not. If not, it would probably make things a lot easier on potential translators to work with: > _("A long string full of $NumberOfCharacters characters"); > instead of: > _('A long string full of') . ' ' . $NumberOfCharacters . ' ' . _('characters'); > > Luckily our code keeper is committed to readable code, > so the variable name should generally describe what it is. > That would give a translator 2 things - more full context to what they are translating > and one less translation to do. I also know languages just enough to know that piecing together english translations in the manner underway does not necessarily produce coherent output. > The more a message can be presented with context, the better the translation will be. > Just a thought - not sure how feasible it is... > > That would be good but I just tried it and sadly no go! echo _("A long string full of $NumberOfCharacters characters"); is not extracted by the string extraction facility. xgettext is given the language=PHP and I guess it is clever enough to know when a string is really a string and not a string mixed in with a varibale. We are stuck with the long hand I fear. Phil |
From: Daintrees <p.d...@pa...> - 2004-09-06 05:48:01
|
I got this message 5 times. Is this a list issue or are you trying to make a point Jesse!! Although I haven't come accross this much - the point is well made. We should get Luca/Rom to take a look at this when they back into it. Phil ----- Original Message ----- From: "Jesse Peterson" <je...@st...> To: <web...@li...> Sent: Monday, September 06, 2004 3:26 PM Subject: Re: [Web-erp-developers] file imports for serial items > I'd have to say it happens more than rarely. Again, my big worry is > choppy, nonsensical translations putting off potential users. I also > believe that using a wrapper class, including the one I mentioned, would > allow us to *only* use it when necessary and the _('xxx') to be used > every other time. > Maybe we need to get some people doing or that can do translations to > take a look and see what effect it may have. It's just something that > would be nice to get right the first time since there are well over 150 > scripts that have to follow which ever way we determine as best. > > jesse > > > Daintrees wrote: > > >Yes this is a good thought. > > > >The saving grace is that variables are very rarely used inside strings. > >Perhaps I am lazy, but I really don't see the need to go to great lengths > >for the 2 or 3 instances of where this happens. > > > >The fall back where gettext is not installed on the local server is to > >create a function that just returns the english string. Translated > >environments thus need gettext installed. I understand that gettext is > >pretty widely available on most web-hosts. It is widely used and tested in > >many environments. I am keen to stick with tried and true. > > > >Phil > > > >----- Original Message ----- > >From: "Jesse Peterson" <je...@st...> > >To: <web...@li...> > >Sent: Monday, September 06, 2004 9:18 AM > >Subject: Re: [Web-erp-developers] file imports for serial items > > > > > > > > > >>>Pros > >>>1) We would need to evaluate how much further it gets the translation > >>>compared to not using. > >>> > >>> > >>> > >>> > >>I see it as allowing more accurate string/message translations however > >>it will require a little more code for the developers and a little extra > >>instruction to a translator (how to move around variables). > >> > >> > >> > >>>Cons > >>>1) The possible slowdowns of using the class instead of built in php > >>>processor gettext code > >>> > >>> > >>> > >>> > >>This class allows use of php's built-in gettext libraries if they are > >>available. This is important as I am pretty sure we could inter-mix it's > >>use with the standard gettext function, therefor only having to use it > >>when we needed a string with vars in it. > >> > >> > >> > >>>2) What's with the setVar? Does that mean we need to add setVars for > >>> > >>> > >every > > > > > >>>var used in a string? That will be some more work. > >>> > >>> > >>> > >>> > >>> > >>Yes, and yes it will be a little more work. > >> > >> > >> > >>>3) Do the tolls for making the po's such as xgettext all work smoothly > >>> > >>> > >with > > > > > >>>this enhancement? > >>> > >>> > >>> > >>> > >>huh? It appears to use the same POs gen'd by xgettext if that's what you > >>are asking about. > >> > >> > >> > >>>4) If setVar is not done on a variable then I'm thinking what will happen > >>> > >>> > >is > > > > > >>>the variable name with $ will appear instead of the variable's value. > >>> > >>> > >This > > > > > >>>could get easily missed by various people at various times. > >>> > >>>5) How stable and used is this class? > >>> > >>> > >>> > >>> > >>They use it and claim it is stable enough for their use. We will have to > >>test it/read docs to determine it's how it functions when mis-used. > >> > >>The main point here, though, is that I haven't seen a more simple way to > >>get things fully translated (as opposed to in pieces) than a wrapper > >>like this or through complicated (s)printfs. If others think the pieced > >>together translations will suffice, then so be it. I just would hate to > >>have gone through this trouble and find later that people really can't > >>stand the translations that have been done and to realize that with a > >>little extra work at the beginning they could have been better. > >> > >>jesse > >> > >> > >> > >> > >> > >>------------------------------------------------------- > >>This SF.Net email is sponsored by BEA Weblogic Workshop > >>FREE Java Enterprise J2EE developer tools! > >>Get your free copy of BEA WebLogic Workshop 8.1 today. > >>http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > >>_______________________________________________ > >>Web-erp-developers mailing list > >>Web...@li... > >>https://lists.sourceforge.net/lists/listinfo/web-erp-developers > >> > >> > >> > > > > > > > >------------------------------------------------------- > >This SF.Net email is sponsored by BEA Weblogic Workshop > >FREE Java Enterprise J2EE developer tools! > >Get your free copy of BEA WebLogic Workshop 8.1 today. > >http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > >_______________________________________________ > >Web-erp-developers mailing list > >Web...@li... > >https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > _______________________________________________ > Web-erp-developers mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/web-erp-developers > |