Activities/Wikipedia/HowTo: Difference between revisions
| Line 141: | Line 141: | ||
== Modify your activity to use the data files == | == Modify your activity to use the data files == | ||
To create a wikipedia in a new language, you will need create the following files: | |||
* activity/activity.info.''lang'': is the activity.info file for your language. You can copy | |||
one from other language, and modify the name, the bundle_id, the icon and the exec line. | |||
to | * activity/activity-wikipedia-''lang''.svg: is the activity icon. The file can be copied from | ||
another language, and modify with a text editor the last text element, to put the labugage code. | |||
If you need edit the image with a graphic editor (like Inkscape) remember add the entities lines | |||
in the header and replace the entities for stroke_color and fill_color, after that. | |||
* activity_''lang''.py: is the startup class, sets the configuration values and starts the server. | |||
You can copy the class from another language and set the parameters. You need set the name of the class, | |||
equal than the value in the exec value in the activity/activity.info.lang file. | |||
* static/about_''lang''.html: Is a static about page. Translate it from a similar page from other language. | |||
* static/index_''lang''.html: is the activity home page. Will have links to good pages to start to explore. | |||
If you create your favorite list based in a translation of the home page from other language, would be a good idea translate the home page too. | |||
Now, you can test your changes, starting the wikipedia server: | Now, you can test your changes, starting the wikipedia server: | ||
./ | ./activity_''lang''.py es_lat/eswiki-20111112-pages-articles.xml 8000 | ||
The first parameter is your xml data file and the second parameter a number of port. | The first parameter is your xml data file and the second parameter a number of port. | ||
| Line 161: | Line 171: | ||
[[File:Wikipedia_test.png]] | [[File:Wikipedia_test.png]] | ||
Finally, to create the new .xo file and distribute it, you must do: | Finally, to create the new .xo file and distribute it, you must do: | ||