barolet / kovans-ogbot

Automatically exported from code.google.com/p/kovans-ogbot
0 stars 0 forks source link

ogame.pl (was: language error) #7

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

i tryed to translate into polish, but i dont know how to fill this points :

# appears when playing simultaneously in two browser windows:
concurrentPetitionsError = 

# long to explain:
noShipSelected = 

# as found after logging in in another browser (JavaScript must be disabled
to see it):
dbProblem = DB problem

What is the expected output? What do you see instead?

Traceback (most recent call last):
  File "gui.pyo", line 224, in startClicked
  File "OGBot.pyo", line 138, in __init__
  File "CommonClasses.pyo", line 175, in __init__
  File "ConfigParser.pyo", line 286, in readfp
  File "ConfigParser.pyo", line 462, in _read
ConfigParser.MissingSectionHeaderError: File contains no section headers.
file: languages/english.ini, line: 1
u"\ufeff# Kovan's OGBot translation file.\n"

What version of the product are you using? On what operating system?

kovans-ogbot-windows_2.04b XP

Please provide any additional information below.

Original issue reported on code.google.com by drac...@op.pl on 9 Feb 2007 at 9:30

GoogleCodeExporter commented 8 years ago
Whole translation :

# Kovan's OGBot translation file.
# Copyright (C) 2006 kovan <jsceballos@gmail.com>

# NOTES ON TRANSLATION:
# The contents of this file are messages searched in the OGame pages.
# This means that, care must be put to translate with the EXACT strings that 
appear
in the OGame pages.
# Details like for example local accents (á, ü...), excamations and 
punctuation
symbols missing... etc. can prevent the bot from working.
# Case differences are OK.
#
# This file uses UTF-8 encoding

[general]

# Server languaje. If in doubth check the main page's main frame's source code 
for
the tag <meta name="language"
languageCode = pl

# Sections ships, buildings, defenses and technologies should be translated as 
found
in the 'Technology' link (OGame left menu)

[ships]

smallCargo = Mały transporter
largeCargo = Duży transporter
lightFighter = Lekki myśliwiec
heavyFighter = Ciężki myśliwiec
cruiser = Krążownik
battleShip = Okręt wojenny
colonyShip = Statek kolonizacyjny
recycler = Recykler
espionageProbe = Sonda szpiegowska
bomber = Bombowiec
solarSatellite = Satelita słoneczny
destroyer = Niszczyciel
deathStar = Gwiazda Śmierci
battlecruiser = Pancernik

[buildings]    

metalMine = Kopalnia metalu
crystalMine = Kopalnia kryształu
deuteriumSynthesizer = Ekstraktor deuteru
solarPlant = Elektrownia słoneczna
fusionReactor = Elektrownia fuzyjna
roboticsFactory = Fabryka robotów
naniteFactory = Fabryka nanitów
shipyard = Stocznia
metalStorage = Magazyn metalu
crystalStorage = Magazyn kryształu 
deuteriumTank = Zbiornik deuteru
researchLab = Laboratorium badawcze
terraformer = Terraformer
allianceDepot = Depozyt sojuszniczy
lunarBase = Stacja księżycowa
sensorPhalanx = Falanga czujników
jumpGate = Teleporter
missileSilo = Silos rakietowy

[defenses]      

rocketLauncher = Wyrzutnia rakiet
lightLaser = Lekkie działo laserowe
heavyLaser = Ciężkie działo laserowe
gaussCannon = Działo Gaussa
ionCannon = Działo jonowe
plasmaTurret = Wyrzutnia plazmy
smallShieldDome = Mała powłoka ochronna
largeShieldDome = Duża powłoka ochronna
antiBallisticMissile = Przeciwrakieta
interplanetaryMissile = Rakieta międzyplanetarna

[technologies]    

espionageTechnology = Technologia szpiegowska
computerTechnology = Technologia komputerowa
weaponsTechnology = Technologia bojowa
shieldingTechnology = Technologia ochronna
armourTechnology = Opancerzenie
energyTechnology = Technologia energetyczna
hyperspaceTechnology = Technologia nadprzestrzenna
combustionDrive = Napęd spalinowy
impulseDrive = Napęd impulsowy
hyperspaceDrive = Napęd nadprzestrzenny
laserTechnology = Technologia laserowa
ionTechnology = Technologia jonowa
plasmaTechnology = Technologia plazmowa
intergalacticResearchNetwork = Międzygalaktyczna Sieć Badań Naukowych
gravitonTechnology = Rozwój grawitonów

[other]

# these 5 are found in the espionage reports:
resourcesOn = Surowce na
fleets = Floty
defense = Obrona
buildings = Budynki
research = Badania

# as found in the overview page:
serverTime = Czas bieżący

# as found in the research page, between parenthesis:
level = Poziom

# as found in the main page, in the universe selection box:
universe = Universum

# as found in the page that appears after failed login:
youAttemptedToLogIn = Próbowałeś zalogować się na

# as found after logging in in another browser (JavaScript must be disabled to 
see it):
dbProblem = DB problem

# as found after logging out:
untilNextTime = Do następnego razu!!

# as found in red in the fleet page:
fleetLimitReached = Maksymalna liczba flot osiągnięta!
fleetLimitReached2 = Maksymalna liczba flot osiągnięta!

# long to explain:
noShipSelected = błąd, brak odpowiednich statków

# these 6 appear in the page shown after having having sent a fleet 
arrivalTime = Czas przybycia
returnTime = Czas powrotu
distance = Odległość
consumption = Zużycie
speed = Prędkość
start = Start
target = Cel

# appears when playing simultaneously in two browser windows:
concurrentPetitionsError = Your last action could not be processed.

Original comment by drac...@op.pl on 9 Feb 2007 at 9:47

GoogleCodeExporter commented 8 years ago

Original comment by drac...@op.pl on 9 Feb 2007 at 9:48

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by jsceballos on 11 Feb 2007 at 2:44

GoogleCodeExporter commented 8 years ago
File should be saved as uft-8 without BOM, then file haven't got u"\ufeff 
header. 

I also try to translate to polish and I have error:

Traceback (most recent call last):
  File "gui.pyo", line 224, in startClicked
  File "OGBot.pyo", line 138, in __init__
  File "CommonClasses.pyo", line 178, in __init__
  File "CommonClasses.pyo", line 178, in <genexpr>
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 10-11:
ordinal not in range(256)

Original comment by rafalv...@gmail.com on 12 Feb 2007 at 12:44

Attachments:

GoogleCodeExporter commented 8 years ago
# as found after logging in in another browser (JavaScript must be disabled to 
see it):
dbProblem = Problem 1 w bazie danych 0 (Proszę zalogować się ponownie)

# long to explain:
noShipSelected = błąd, brak odpowiednich statków

takie coś udało mi się znależć czego nie masz w swoim tłumaczeniu, dalej 
nie moge
sobie  poradzić z Utf-8 i wyrzuca mi błąd z header section.

Original comment by drac...@op.pl on 12 Feb 2007 at 6:23

GoogleCodeExporter commented 8 years ago
Could you translate that to English. Thanks.

Original comment by jsceballos on 12 Feb 2007 at 10:38

GoogleCodeExporter commented 8 years ago

Original comment by jsceballos on 12 Feb 2007 at 10:41

GoogleCodeExporter commented 8 years ago
I found this two translation.

# as found after logging in in another browser (JavaScript must be disabled to 
see it):
dbProblem = Problem 1 w bazie danych 0 (Proszę zalogować się ponownie)

but im am not sure about this one:

# long to explain:
noShipSelected = błąd, brak odpowiednich statków

and i have problems with compiling to utf-8 , maybe some one else cold do it 
for me
i attach file witch full translation, but may cotain errors, and it is not in
utf-8... please check :D

Original comment by drac...@op.pl on 13 Feb 2007 at 10:31

Attachments:

GoogleCodeExporter commented 8 years ago
I changed in CommonClasses.py in class Translations:
 value.encode('ISO-8859-1')
to:
 value.encode('ISO-8859-2')
it is polish encoding used on ogame pages (mayby add this setting to language 
file)

In WebAdapter.py every statement like:
 page = response.read()
(...)
 self.REGEXPS[...].findall(page)
to:
 self.REGEXPS[...].findall(str(page))
same for 
 if self.translations[...] in p: 
etc.
Because page isn't always string object, regexp couldn't find match and this 
caused
error like:
 File "WebAdapter.pyo", line 101, in __init__
 IndexError: list index out of range

I use Python 2.5

Original comment by rafalv...@gmail.com on 14 Feb 2007 at 11:46

GoogleCodeExporter commented 8 years ago
In WebAdapter.py I found other bug:
 if freeSlots <= slotsToReserve:
  raise NoFreeSlotsError()
It was always true - bot never sent attacks
I changed it to:
 if int(freeSlots) <= int(slotsToReserve):
  raise NoFreeSlotsError()

Now bot works correct.

Original comment by rafalv...@gmail.com on 15 Feb 2007 at 12:13

GoogleCodeExporter commented 8 years ago
Support for ogame.pl added in v2.1

Original comment by jsceballos on 25 Feb 2007 at 9:51