Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

Please read this post before posting

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post for download

Now available: AJAX/PHP multilingual website templates

Discussion of Ken True's web site templates

Moderator: saratogaWX

User avatar
actioman
Posts: 118
Joined: Sat Mar 20, 2010 1:01 am
Weather Station: Davis Vantage Pro2 Plus
Operating System: Windows XP SP3
Location: Elvas, Portugal
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Postby actioman » Wed Mar 13, 2013 11:41 pm

Another progress ...

If I remove the ".", the code makes the translation. If I put them on, do not. This is in the "language-LL.txt" file.

example:

Does the translation

Code: Select all

langlookup|Mostly clear and cooler|Céu geralmente limpo e descida de temperatura|
langlookup|Mostly clear and warmer|Céu geralmente limpo e aumento de temperatura|


Does not make the translation

Code: Select all

langlookup|Mostly clear and cooler.|Céu geralmente limpo e descida de temperatura.|
langlookup|Mostly clear and warmer.|Céu geralmente limpo e aumento de temperatura.|
Kind Regards, Manuel.

Image

BCJKiwi
Posts: 845
Joined: Mon Jul 09, 2012 8:40 pm
Weather Station: Davis VP2 Cabled with Solar
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Postby BCJKiwi » Thu Mar 14, 2013 2:43 am

@Actionman
See Marks above post of 13 Mar 2013, 03:58.

BCJKiwi
Posts: 845
Joined: Mon Jul 09, 2012 8:40 pm
Weather Station: Davis VP2 Cabled with Solar
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Postby BCJKiwi » Thu Mar 14, 2013 3:41 am

@Ken,
I have a test line;
Increasing clouds and warmer. Precipitation possible within 12 to 24 hours Windy.
With the first version of the function these lines in language-en.txt;

Code: Select all

langlookup|Increasing clouds and warmer|Increasing clouds and warmer|
langlookup|Precipitation possible within 12 to 24 hours|Precipitation possible within 12 to 24 hours. Windy|
We get the desired result (i.e we get the '.' after hours) from the source tag Davis string of

Code: Select all

Increasing clouds and warmer. Precipitation possible within 12 to 24 hours Windy.

However, with the second version of the function
using the 3 sentences

Code: Select all

langlookup|Increasing clouds and warmer|Increasing clouds and warmer|
langlookup|Precipitation possible within 12 to 24 hours|Precipitation possible within 12 to 24 hours|
langlookup|Windy|Windy|
we get

Code: Select all

Increasing clouds and warmer. Precipitation possible within 12 to 24 hours Windy.

If I add a '.' after hours in the translated string there is no change.

Can we not do the same sort of thing the original langtransstr() translation functions did by matching the strings we put in the source section and translating how we want. Naturally it would have to be repeated until we used up all the Davis string.

Then we could check for matches to;

Code: Select all

langlookup|Increasing clouds and warmer|Increasing clouds and warmer.|
langlookup|Precipitation possible within 12 to 24 hours|Precipitation possible within 12 to 24 hours.|
langlookup|Windy|Windy.|
and add ',' or '.'s ourselves.

This would allow us to break out a lot more of the repetition.
e.g. in my current list there are five repetitions of the four direction variants of 'possible wind shift to the E, NE, or N' so that could reduce 20 alternatives to 4. These are combined with an even greater number of 'Precipitation possible within 6 hours' with 4 hour variants used for these strings and others, and so it goes on.

As previously noted I think we will keep finding different new combinations. My list is now 71 long and I'm sure it will grow as there are obvious omissions (which may or may not appear at some point on a live system). The more generic/granular the system is, the more likely it is to cover these 'future' translations.

User avatar
actioman
Posts: 118
Joined: Sat Mar 20, 2010 1:01 am
Weather Station: Davis Vantage Pro2 Plus
Operating System: Windows XP SP3
Location: Elvas, Portugal
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Postby actioman » Thu Mar 14, 2013 2:43 pm

Hi :)

@BCJKiwi,

I read Mark's post, but did not understand the totality of his message, mainly due to lack of programming bases. :oops:
But I can at least serve as a tester, and I'm reporting what works and what does not. :)



Well after several fixes, mostly my mistakes when copying phrases, here is my conclusion:

These are the phrases that the function can not translate.

Code: Select all

103   Increasing clouds and cooler. Precipitation possible within 12 to 24 hours possible wind shift to the W, NW, or N.
-->   Aumento da nebulosidade e descida de temperatura. Precipitation possible within 12 to 24 hours possible wind shift to the W, NW, or N.
104   Increasing clouds with little temperature change. Precipitation possible within 12 to 24 hours possible wind shift to the W, NW, or N.
-->   Aumento da nebulosidade com pequenas alterações na temperatura. Precipitation possible within 12 to 24 hours possible wind shift to the W, NW, or N.
107   Increasing clouds and cooler. Precipitation possible within 6 hours possible wind shift to the W, NW, or N.
-->   Aumento da nebulosidade e descida de temperatura. Precipitation possible within 6 hours possible wind shift to the W, NW, or N.
108   Increasing clouds with little temperature change. Precipitation possible within 6 hours possible wind shift to the W, NW, or N.
-->   Aumento da nebulosidade com pequenas alterações na temperatura. Precipitation possible within 6 hours possible wind shift to the W, NW, or N.
109   Mostly cloudy and cooler. Precipitation ending within 12 hours possible wind shift to the W, NW, or N.
-->   Muito nublado e descida de temperatura. Precipitation ending within 12 hours possible wind shift to the W, NW, or N.
111   Mostly cloudy with little temperature change. Precipitation ending within 12 hours possible wind shift to the W, NW, or N.
-->   Muito nublado com pequenas alterações na temperatura. Precipitation ending within 12 hours possible wind shift to the W, NW, or N.
113   Mostly cloudy and cooler. Precipitation ending within 12 hours possible wind shift to the W, NW, or N.
-->   Muito nublado e descida de temperatura. Precipitation ending within 12 hours possible wind shift to the W, NW, or N.
116   Mostly cloudy and cooler. Precipitation possible within 24 hours possible wind shift to the W, NW, or N.
-->   Muito nublado e descida de temperatura. Precipitation possible within 24 hours possible wind shift to the W, NW, or N.
117   Mostly cloudy with little temperature change. Precipitation ending within 12 hours possible wind shift to the W, NW, or N.
-->   Muito nublado com pequenas alterações na temperatura. Precipitation ending within 12 hours possible wind shift to the W, NW, or N.
118   Mostly cloudy with little temperature change. Precipitation possible within 24 hours possible wind shift to the W, NW, or N.
-->   Muito nublado com pequenas alterações na temperatura. Precipitation possible within 24 hours possible wind shift to the W, NW, or N.
167   Increasing clouds and cooler. Precipitation possible within 6 hours possible wind shift to the W, NW, or N.
-->   Aumento da nebulosidade e descida de temperatura. Precipitation possible within 6 hours possible wind shift to the W, NW, or N.
169   Increasing clouds with little temperature change. Precipitation possible within 6 hours possible wind shift to the W, NW, or N.
-->   Aumento da nebulosidade com pequenas alterações na temperatura. Precipitation possible within 6 hours possible wind shift to the W, NW, or N.



Is unable to translate:

Precipitation possible within 6 hours possible wind shift to the W, NW, or N
Precipitation ending within 12 hours possible wind shift to the W, NW, or N
Precipitation possible within 24 hours possible wind shift to the W, NW, or N
Precipitation possible within 12 to 24 hours possible wind shift to the W, NW, or N


And I believe this is by having two different phrases (as marked by the above two colors), but without marking it with the ".".
As such the function does not know how to handle this situation, ignoring the translation.
To work we would have to create multiple entries with a complete sentence in the "language-LL.txt" file, something that can be done. But of course the reason for this great piece of code is to simplify the translation and not having to create 200 entries in "language-LL.txt".
Kind Regards, Manuel.

Image

BCJKiwi
Posts: 845
Joined: Mon Jul 09, 2012 8:40 pm
Weather Station: Davis VP2 Cabled with Solar
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Postby BCJKiwi » Thu Mar 14, 2013 7:45 pm

Yes,
The lack of the '.' was the thrust of all my earlier posts and would require many more 'full' strings of combined sentences to be added to the list to achieve a complete system.

As my main presentation is in English, my tests have been done in English and it is useful for testing as it is easy to see what the differences are.

Ken's second version of the function does appear to fix this issue and as per my last post can build a forecast from three separate sentences with or without '.'s and will put back the '.'s where they were originally but does not put the '.'s in where they were missing. However it does not allow you to add a '.' to the end of an original sentence that does not have one which could be done with the first version of the function. However this is no different from the original un-translated forecast - which in all fairness is a lesser issue.

I have tested forecast 103 on your list of 'can not translate' and it translates fine.
In Language-en.txt I have;

Code: Select all

langlookup|Increasing clouds and cooler|Increasing clouds xxx and cooler|
langlookup|Precipitation possible within 12 to 24 hours possible wind shift to the W, NW, or N|Precipitation possible within 12 xxx to 24 hours, possible wind xxx shift to the W, NW, or N|
These produce this forecast from the original forecast 103.

Code: Select all

Increasing clouds xxx and cooler. Precipitation possible within 12 xxx to 24 hours, possible wind xxx shift to the W, NW, or N.
Note the ',' after 'hours' which is in the translation and the '.'s that exist in the original are put back.
The language-en.txt does not contain any ending '.'s as the function strips these out when breaking the forecast into sentences.

User avatar
actioman
Posts: 118
Joined: Sat Mar 20, 2010 1:01 am
Weather Station: Davis Vantage Pro2 Plus
Operating System: Windows XP SP3
Location: Elvas, Portugal
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Postby actioman » Thu Mar 14, 2013 10:53 pm

Ohh yes Ok. I had this string deleted from my "language-LL.txt" file and I do not know why... :?
Thanks again BCJKiwi!

Already corrected, so now I have the weather forecasts completely translated. :D

What would be really interesting, was if we could make these translations using only the 50 individual component forecast strings in the vantagepro.dll, like Mark showed us. ;)
Kind Regards, Manuel.

Image

BCJKiwi
Posts: 845
Joined: Mon Jul 09, 2012 8:40 pm
Weather Station: Davis VP2 Cabled with Solar
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Postby BCJKiwi » Sat Mar 16, 2013 12:57 am

I've had a good look at the supposed efficiencies to be gained by breaking the Davis forecast sentences into smaller phrases to reduce the number of lines that need to be processed to obtain the final forecast.
1. Ken's current scripts for language translation appear to load the whole lanugauge-LL.txt file into an array.
2. The various routines called by langtrans() and langtransstr() and, involving a raft of additional functions, rely on calling these functions with one known text string or variable value at a time.
This is why the extra function added to ajax-dashboard.php breaks the forecast into separate strings so each can be sent in turn to the existing translation functions. There is no obvious alternative to the '.' for doing this.

So to do what I (we) have been requesting would require either a lot more processing in ajax-dashboard.php, or a completely new routine.

Also the supposed benefits appear doubtful as;
1. the current list of Davis sentences (attached) is 71 items
2. After breaking out all the reasonable phrases to remove as much duplication as appears feasible the list still has 46 items.
3. There are downsides as;
a. there are more phrases to be passed to the translation functions,
b. There are variations with and without ','s - if both are provided then the list gets longer,
c. the ability to manipulate the final result is reduced - e.g. I currently am able to add a ',' or '.' into a Davis sentence via the translation where it is missing - this is not possible with separate phrases as some would benefit from the ',' or '.' but some cannot take it. Also the present routines apply a '.' to the end of each sentence.

So, I think we should be grateful for Ken's efforts and work with what we now have as I doubt any further work is likely to provide any real overall benefit.
You do not have the required permissions to view the files attached to this post.

BCJKiwi
Posts: 845
Joined: Mon Jul 09, 2012 8:40 pm
Weather Station: Davis VP2 Cabled with Solar
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Postby BCJKiwi » Sat Mar 16, 2013 12:59 am

@ actionman,

Would you be able to provide your translation(s) for others to use/
Thanks

gemini06720
Posts: 1700
Joined: Mon Aug 10, 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Now available: AJAX/PHP multilingual website templates

Postby gemini06720 » Sat Mar 16, 2013 1:23 am

Brian, I would like to correct you on one statement:

BCJKiwi wrote:...c. the ability to manipulate the final result is reduced - e.g. I currently am able to add a ',' or '.' into a Davis sentence via the translation where it is missing - this is not possible with separate phrases as some would benefit from the ',' or '.' but some cannot take it. Also the present routines apply a '.' to the end of each sentence.
Brian, it appears the 'language-en.txt' (or 'language-LL.txt' for other languages) file is continuously used to display the message (well, it is on the canadian version of the template set).

As a test, I modified the right part of a language line to display a slightly different text than the original, by adding a comma and even a period to the original (left part of the language line) text, and the modified text displayed properly with the modification I made.

Thus, it is possible to manipulate the final result as long as the original text is accurately entered... ;)

BCJKiwi
Posts: 845
Joined: Mon Jul 09, 2012 8:40 pm
Weather Station: Davis VP2 Cabled with Solar
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Postby BCJKiwi » Sat Mar 16, 2013 4:10 am

Ray,

Please re-read the post.
This post was to cover off the expressed desire of mine and others to further "improve" the routine which can only work off the full Davis sentences in which there is significant repetition of phrases within the sentences.

The limitation arises when trying to use phrases instead of sentences - i.e. by trying to more than we have at present with Ken's latest translation function within ajax-dashboard.php.

The purpose of the post was to indicate that in my view there is no point in trying to break down these Davis sentences into phrases.

My earlier posts cover off exactly your point and is one of the advantages of the present setup as I have discussed before.

User avatar
actioman
Posts: 118
Joined: Sat Mar 20, 2010 1:01 am
Weather Station: Davis Vantage Pro2 Plus
Operating System: Windows XP SP3
Location: Elvas, Portugal
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Postby actioman » Sat Mar 16, 2013 4:26 am

BCJKiwi wrote:@ actionman,

Would you be able to provide your translation(s) for others to use/
Thanks


Sure :) . Here is the translation into Portuguese:

Code: Select all

#
# vpforecast in ajax-dashboard.php
#
langlookup|Clearing and cooler|Diminuição da nebulosidade e descida de temperatura|
langlookup|Clearing, cooler and windy|Diminuição da nebulosidade, descida de temperatura e ventoso|
langlookup|FORECAST REQUIRES 3 HOURS OF RECENT DATA|A PREVISÃO REQUER 3 HORAS DE DADOS RECENTES|
langlookup|Increasing clouds and cooler|Aumento da nebulosidade e descida de temperatura|
langlookup|Increasing clouds and warmer|Aumento da nebulosidade e subida de temperatura|
langlookup|Increasing clouds with little temperature change|Aumento da nebulosidade com pequenas alterações na temperatura|
langlookup|Increasing winds|Vento em aumento|
langlookup|Mostly clear and cooler|Céu geralmente limpo e descida de temperatura|
langlookup|Mostly clear and warmer|Céu geralmente limpo e aumento de temperatura|
langlookup|Mostly clear for 12 hours with little temperature change|Céu geralmente limpo nas próximas 12 horas com pequenas alterações na temperatura|
langlookup|Mostly clear for 12 to 24 hours and cooler|Céu geralmente limpo nas próximas 12 a 24 horas e descida de temperatura|
langlookup|Mostly clear for 12 to 24 hours with little temperature change|Céu geralmente limpo nas próximas 12 a 24 horas com pequenas alterações na temperatura|
langlookup|Mostly clear for 6 to 12 hours with little temperature change|Céu geralmente limpo nas próximas 6 a 12 horas com pequenas alterações na temperatura|
langlookup|Mostly clear with little temperature change|Céu geralmente limpo com pequenas alterações na temperatura|
langlookup|Mostly clear|Céu geralmente limpo|
langlookup|Mostly cloudy and cooler|Muito nublado e descida de temperatura|
langlookup|Mostly cloudy with little temperature change|Muito nublado com pequenas alterações na temperatura|
langlookup|Mostly cloudy, Rain and/or snow possible or continuing|Muito nublado, possibilidade ou continuação de chuva e/ou neve|
langlookup|Mostly cloudy, Rain possible or continuing|Muito nublado, possibilidade ou continuação de chuva|
langlookup|Mostly cloudy, Snow possible or continuing|Muito nublado, possibilidade ou continuação de Neve|
langlookup|Mostly cloudy|Muito nublado|
langlookup|Partialy cloudy, Rain and/or snow possible or continuing|Parcialmente nublado, possibilidade ou continuação de Chuva e/ou neve|
langlookup|Partialy cloudy, Rain possible or continuing|Parcialmente nublado, possibilidade ou continuação de chuva|
langlookup|Partialy cloudy, Snow possible or continuing|Parcialmente nublado, possibilidade ou continuação de neve|
langlookup|Partialy cloudy|Parcialmente nublado|
langlookup|Partly cloudy and cooler|Parcialmente nublado e descida de temperatura|
langlookup|Partly cloudy with little temperature change|Parcialmente nublado com pequenas alterações na temperatura|
langlookup|Possible wind shift to the W, NW, or N|Possível mudança do vento para W, NW, ou N|
langlookup|Possible wind shift to the W, SW, or S|Possível mudança do vento para W, SW, ou S|
langlookup|Possible wind shift to the E, NE or N|Possível mudança do vento para E, NE ou N|
langlookup|Possible wind shift to the E, SE or S|Possível mudança do vento para E, SE ou S|
langlookup|Precipitation continuing, possible heavy at times|Continuação da precipitação, por vezes provavelmente forte|
langlookup|Precipitation continuing, possibly heavy at times|Continuação da precipitação, por vezes talvez forte|
langlookup|Precipitation continuing|Continuação da precipitação|
langlookup|Precipitation ending in 12 to 24 hours|Precipitação a terminar dentro de 12 a 24 horas|
langlookup|Precipitation ending within 12 hours|Precipitação a terminar dentro de 12 horas|
langlookup|Precipitation ending within 6 hours|Precipitação a terminar dentro de 6 horas|
langlookup|Precipitation ending in 12 to 24 hours possible wind shift to the W, NW, or N|Precipitação a terminar dentro de 12 a 24 horas, possível mudança do vento para W, NW, ou N|
langlookup|Precipitation ending in 12 to 24 hours possible wind shift to the W, SW, or S|Precipitação a terminar dentro de 12 a 24 horas, possível mudança do vento para W, SW, ou S|
langlookup|Precipitation ending within 12 hours possible wind shift to the W, NW, or N|Precipitação a terminar dentro de 12 horas, possível mudança do vento para W, NW, ou N|
langlookup|Precipitation ending within 12 hours possible wind shift to the W, SW, or S|Precipitação a terminar dentro de 12 horas, possível mudança do vento para W, SW, ou S|
langlookup|Precipitation ending within 6 hours possible wind shift to the W, NW, or N|Precipitação a terminar dentro de 6 horas, possível mudança do vento para W, NW, ou N|
langlookup|Precipitation ending within 6 hours possible wind shift to the W, SW, or S|Precipitação a terminar dentro de 6 horas, possível mudança do vento para W, SW, ou S|
langlookup|Possible wind shift to the W, NW, or N|Possível mudança do vento para W, NW, ou N|
langlookup|Possible wind shift to the W, SW, or S|Possível mudança do vento para W, SW, ou S|
langlookup|Possible wind shift to the E, NE, or N|Possível mudança do vento para E, NE, ou N|
langlookup|Possible wind shift to the E, SE, or S|Possível mudança do vento para E, SE, ou S|
langlookup|Precipitation possible within 6 hours possible wind shift to the W, NW, or N|Possível precipitação dentro de 6 horas, possível mudança do vento para W, NW, ou N|
langlookup|Precipitation possible within 12 hours possible wind shift to the W, NW, or N|Possível precipitação dentro de 12 horas, possível mudança do vento para W, NW, ou N|
langlookup|Precipitation possible within 12 to 24 hours possible wind shift to the W, NW, or N|Possível precipitação dentro de 12 a 24 horas, possível mudança do vento para W, NW, ou N|
langlookup|possible wind shift to the W, NW, or N|possível mudança do vento para W, NW, ou N|
langlookup|possible wind shift to the W, SW, or S|possível mudança do vento para W, SW, ou S|
langlookup|possible wind shift to the E, NE, or N|possível mudança do vento para E, NE, ou N|
langlookup|possible wind shift to the E, SE, or S|possível mudança do vento para E, SE, ou S|
langlookup|Precipitation likely, possibly heavy at times|Precipitação provável, por vezes possivelmente forte|
langlookup|Precipitation likley|Precipitação provável|
langlookup|Precipitation likely|Precipitação provável|
langlookup|Precipitation possible and windy within 6 hours|Possível precipitação e ventoso dentro de 6 horas|
langlookup|Precipitation possible within 12 hours, possibly heavy at times|Possível precipitação dentro de 12 horas por vezes provavelmente forte|
langlookup|Precipitation possible within 6 to 12 hours, possibly heavy at times|Possível precipitação dentro de 6 a 12 horas por vezes provavelmente forte|
langlookup|Precipitation possibly heavy at times and ending within 12 hours|Precipitação por vezes provavelmente forte e a terminar dentro de 12 horas|
langlookup|Precipitation possible within 6 hours|Possível precipitação dentro de 6 horas|
langlookup|Precipitation possible within 12 hours|Possível precipitação dentro de 12 horas|
langlookup|Precipitation possible within 24 hours|Possível precipitação dentro de 24 horas|
langlookup|Precipitation possible within 48 hours|Possível precipitação dentro de 48 horas|
langlookup|Precipitation possible within 6 to 12 hours|Possível precipitação dentro de 6 a 12 horas|
langlookup|Precipitation possible within 12 to 24 hours|Possível precipitação dentro de 12 a 24 horas|
langlookup|Precipitation possible within 24 to 48 hours|Possível precipitação dentro de 24 a 48 horas|
langlookup|Precipitation possible within 6 hours Windy|Possível precipitação dentro de 6 horas. Ventoso|
langlookup|Precipitation possible within 12 hours Windy|Possível precipitação dentro de 12 horas. Ventoso|
langlookup|Precipitation possible within 24 hours Windy|Possível precipitação dentro de 24 horas. Ventoso|
langlookup|Precipitation possible within 48 hours Windy|Possível precipitação dentro de 48 horas. Ventoso|
langlookup|Precipitation possible within 6 to 12 hours Windy|Possível precipitação dentro de 6 a 12 horas. Ventoso|
langlookup|Precipitation possible within 12 to 24 hours Windy|Possível precipitação dentro de 12 a 24 horas. Ventoso|
langlookup|Precipitation possible within 24 to 48 hours Windy|Possível precipitação dentro de 24 a 48 horas. Ventoso|
langlookup|Windy with possible wind shift to the W, NW, or N|Ventoso com possível mudança do vento para W, NW, ou N|
langlookup|Windy with possible wind shift to the W, SW, or S|Ventoso com possível mudança do vento para W, SW ou S|
langlookup|Windy with possible wind shift to the E, NE or N|Ventoso com possível mudança do vento para E, NE ou N|
langlookup|Windy with possible wind shift to the E, SE or S|Ventoso com possível mudança do vento para E, SE ou S|
langlookup|Windy|Ventoso|
#
#end vpforecast in ajax-dashboard.php
#


For Spanish, is not finished yet...
I'm taking longer because there is a Spanish version of the WeatherLink and I'm crossing my translation with a few sites that have the forecast in Spanish and thus see how Davis did the translation into this language. ;)
But as soon as I have finished, I will leave it here for sure.
Kind Regards, Manuel.

Image

BCJKiwi
Posts: 845
Joined: Mon Jul 09, 2012 8:40 pm
Weather Station: Davis VP2 Cabled with Solar
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Postby BCJKiwi » Sat Mar 16, 2013 11:08 am

actionman,
It seems you have some forecast sentences I did not have and I have some you don't. I also found a few duplicates in your list.
This makes a combined list with all we each have, of 94 rows.
To help find the variations and duplicates etc, I sort the lists in Excel.

Have attached the two lists in a side by side format in .xls format zipped.
Appreciate your comments.
You do not have the required permissions to view the files attached to this post.

User avatar
actioman
Posts: 118
Joined: Sat Mar 20, 2010 1:01 am
Weather Station: Davis Vantage Pro2 Plus
Operating System: Windows XP SP3
Location: Elvas, Portugal
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Postby actioman » Sun Mar 17, 2013 4:44 am

Hi BCJKiwi!

Great work, thank you very much.
Can you tell me which weather forecasts I have duplicated?

Some of the weather forecasts that you have and I had not, based on what Mark told us, they have no reason to exist since they are not under the davis dll file used by Cumulus. But just in case, I added to my list. ;)
Kind Regards, Manuel.

Image

BCJKiwi
Posts: 845
Joined: Mon Jul 09, 2012 8:40 pm
Weather Station: Davis VP2 Cabled with Solar
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Postby BCJKiwi » Sun Mar 17, 2013 9:53 pm

The file I attached in my last post already had the duplicates removed.
If you have excel the simplest thing to do is to paste your list into an adjacent column and sort. All the differences will then be easy to spot.
Also there is a line or two in the -en file that have a '|' missing or duplicated - these are ones I added from your -pt and replaced the pt with en in the translated field (messing with excel 2013 and it's new 'clean' look means there is not so much space between some chars making it more difficult to make selections :( ).

Yes I know there are items that are not in the dll source list.
However I have added sentences where;
1. They cover direction variations - i.e. the E ones which are almost entirely missing.
2. They allow for 'correction/improvement' e.g. the forecast ending in Windy where there is no '.' at the end of the preceding sentence, including that allows for the addition of the '.'
I have no idea if they will actually turn up in a real forecast but there has already been comment about the direction items being different in different places around the world but since the DLL is same everywhere, one has to assume these will be generated somehow.

I noticed also that some of the W direction have variants with and without ','s - are there really that many 'errors/inconsistencies' in the Davis dll?

User avatar
saratogaWX
Posts: 835
Joined: Wed May 06, 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
Location: Saratoga, CA, USA
Contact:

Re: Now available: AJAX/PHP multilingual website templates

Postby saratogaWX » Sun Mar 17, 2013 11:25 pm

I just looked at the VantagePro.dll V2.4 (using Process Explorer, Strings) and found the following forecasts

Code: Select all

Windy with possible wind shift to the W, SW, or S.
Possible wind shift to the W, SW, or S.
Partly cloudy with little temperature change.
Partly cloudy and cooler.
Windy with possible wind shift to the W, NW, or N.
Possible wind shift to the W, NW, or N.
Windy.
Increasing winds.
Precipitation possible within 48 hours
Precipitation possible within 24 to 48 hours
Precipitation possible within 24 hours
Precipitation possible within 12 to 24 hours
Precipitation possible within 12 hours, possibly heavy at times.
Precipitation possible within 12 hours
Precipitation possible within 6 to 12 hours
Precipitation possible within 6 to 12 hours, possibly heavy at times.
Precipitation possible and windy within 6 hours
Precipitation possible within 6 hours
Precipitation ending in 12 to 24 hours
Precipitation possibly heavy at times and ending within 12 hours
Precipitation ending within 12 hours
Precipitation ending within 6 hours
Precipitation likely, possibly heavy at times.
Precipitation likely.
Precipitation continuing, possibly heavy at times.
Precipitation continuing.
FORECAST REQUIRES 3 HOURS OF RECENT DATA.
Mostly cloudy with little temperature change.
Mostly cloudy and cooler.
Clearing, cooler and windy.
Clearing and cooler.
Increasing clouds and cooler.
Increasing clouds with little temperature change.
Increasing clouds and warmer.
Mostly clear for 12 to 24 hours with little temperature change.
Mostly clear for 6 to 12 hours with little temperature change.
Mostly clear and warmer.
Mostly clear for 12 to 24 hours and cooler.
Mostly clear for 12 hours with little temperature change.
Mostly clear with little temperature change.
Mostly clear and cooler.
Partialy cloudy, Rain and/or snow possible or continuing
Partialy cloudy, Snow possible or continuing
Partialy cloudy, Rain possible or continuing
Mostly cloudy, Rain and/or snow possible or continuing
Mostly cloudy, Snow possible or continuing
Mostly cloudy, Rain possible or continuing
Mostly cloudy
Partialy cloudy
Mostly clear

Note that some have periods (with a space afterwards), and some do not. The only wind direction sets appear to be 'W, SW, or S' and 'W, NW, or N' .. I'm not sure that they replace those with 'E' for 'W' or not (so 'E, SE, or S' and 'E, NE, or N' may or may not appear)

Best regards,
Ken


Return to “Saratoga Templates”

Who is online

Users browsing this forum: No registered users and 4 guests