Difference between revisions of "Editing Inkscape's website"

From Inkscape Wiki
Jump to navigation Jump to search
m (link fix)
 
Line 7: Line 7:
To checkout the website cvs module:
To checkout the website cvs module:


:Type <pre>cvs co inkscape_web</pre> after you have logged in with your username/password
:Type <pre>svn co inkscape_web</pre> after you have logged in with your username/password
 
For more info, see See [[WorkingWithCVS]].
 


For more info, see See [[WorkingWithSVN]].


== Testing your website changes locally ==
== Testing your website changes locally ==

Revision as of 19:51, 22 January 2006

Once you have developer-level access to the project, you can also help with maintenance of the Inkscape website.


CVS Checkout of the Website Module

To checkout the website cvs module:

Type
svn co inkscape_web
after you have logged in with your username/password

For more info, see See WorkingWithSVN.

Testing your website changes locally

Once you have checked out (see previous heading) the website module, then make a symbolic link to your web root directory. To do this for apache on redhat9 the best way is to navigate to

/var/www/html

and then type:

ln -s /usr/src/inkscape-project/inkscape_web
(NOTE: that the path you pass should be relative/absolute to the inkscape_web module you just checked out)

Thus, once you have done this, then you will be able to view the Inkscape website at

http://localhost/inkscape_web/

on your computer via a web browser.

Hopefully, you have apache configured properly and it is running.

Making Your Changes Live on Inkscape.org

  1. Make your changes to your local inkscape_web cvs module.
  2. Commit your changes, ensuring that you provide ample notes in your commit log message.
  3. ssh -l <your sf username> ssh.sourceforge.net *
  4. cd inkscape/inkscape_web
  5. ./publish_web.sh

(*)

If you haven't done this before, you need to set up a link to the inkscape_web folder in your home directory.
ln -s /home/groups/i/in/inkscape inkscape

Adding News to the Site

If you have CVS access, you can add news to the site. First, you should add your signature to /includes/signatures.inc.

Create your news in english always! create a new file in the news/en/<this-year>/<this-month> folder, and give it the next highest number. (if there are files named 001.inc and 002.inc, name yours 003.inc) You can use this as a template:

 <div class="item">
 <h3>HEADER</h3>
 <b>MONTH DAY, YEAR</b>
 <p>MESSAGE
 </p>
 <?php echo $[[SIG_YOURNAME]]; ?>
 </div>

Add new paragraphs if needed and dont forget to change the signature.

If you want, translate the news to your language and save it in news/XX/<this-year>/<this-month>

If you really want to add news only in your language (not english), it might probably be the better way to modify your localized header (/index.xx-header.php). If you really think you need to have a local-only news, then please add an empty file with the same name (number) in the english directory and add a comment:


Make your changes live as described above.


Adding Screenshots to the Site

The best way to add screenshots to the website is not by emailing them to the list or to any one developer unless you are not a developer. Instead, the best way is to create a screenshot for whatever screen size your system is set to (preferably a standard size like 1024 by 768), creating it in the PNG file format and then give it a descriptivename.

Then the resulting thumbnail should be of the resolution 267 pixels wide by 200 pixels high in PNG format. The naming must be in relationship to the screenshot.

Naming convention is:

inkscape-<version>-<id>-<name>.png
inkscape-<version>-<id>-<name>_thumb.png

Example:

inkscape-0.43-01-myfeature.png
inkscape-0.43-01-myfeature_thumb.png

<id> is ment to be something like 01, 02, 03... but you can also use 10a, 10b, 10c. this affects the order in the gallery. use zzz to place a sceenshot on top. (NOTE: <id> wasnt there before. but i suggest using it beginning with 0.43)

save your shot into the "screenshots/gallery" folder, the thumb into "screenshots/gallery/thumbs".


Once the graphics are in the right folder, my lovely PHP script will display them automatically on the main page of the website. They also appear on the screenshots/index.php page, therefore you must create a description file:

inkscape-<version>-<id>-<name>.en

You may also create translations of description files. Just replace .en with the language code. Example:

inkscape-0.43-01-myfeature.en
inkscape-0.43-01-myfeature.de
inkscape-0.43-01-myfeature.es

Store them in "screenshots/gallery/info"

Then make sure that you add your new images and description files and any changes to the CVS repository. For more info, see WorkingWithCVS.


Translating the Inkscape Website

1. Do a CVS checkout of the website module.

IMPORTANT: all files you change MUST be UTF-8 encoded!!! 
           else, you will get broken output.
           See UT-8 note below, please.

2. Add your language by these steps: - update the following line includes/header.php

$LANGUAGES = array("en", "de", "es"); // available languages

- Add a flag for your language in the images directory. It should be named inkscape_web/images/flag-XX.png. (where XX is your language code). Size is 34x20px.

- Add a line to css/base.css, similar to the following: (place your flag 50px left of the others)

#lang-xx { left:225px; }


- Add a link for your flag in includes/header.php

- create a copy of includes/localized-en.inc for your language. (like includes/localized-fr.inc) and translate the values of the strings.

- copy and translate index.en-header.php to your language.

- copy the subdirectory structure news/en/ to news/xx/ and, if you want, translate the news. (you can delete all news that you will not translate. the script will use the original news of /news/en then)

- you may add a signature to includes/signatures.inc and use it for news you create.

3. Look into other pages to see what needs to be done to translate them. (in general you need to create an inclusion file) Files you need to translate: (at least you must create a copy for your language, or those pages will fail to open)

discussion-en.inc
download-en.inc
mailing_lists-en.inc
report_bugs-en.inc
submit2webmaster-en.inc
submit2webmaster-en-form.inc
doc/index-en.inc
status/index-en.inc

You also may translate news, screenshot comments and status files.

   Note:  The tutorial translations in the doc/ directory are handled
   separately from the website translation.  These are the files in
   inkscape_web/doc/*/ that have .XX.html extensions.  You do not need
   to do anything about these pages.
   Note:  The translation of doxygen, wiki, and the various SF pages
   are separate from the website translation.  You do not need to do
   anything about these pages.

5. Add a news item to the index page announcing your translation. You are encouraged to write it in both English and your native language. Use UTF-8 character set (or character entities if you prefer). You do this by adding a file like /news/en/200x/xx/0xx.inc and write your announcement.

IMPORTANT: all files you change MUST be UTF-8 encoded!!! else, you will break get broken output.
See UT-8 note below, please. 
   Note: Even if the announcement does not need to be translated, 
   you should copy it to your languages folder also.
   Reason: Same news must have same file names. If your announcement 
   is 010.inc, and then the next news is 011.inc, if you translate 
   that news only, your announcement will no more be shown. This is 
   because if you have 11 localized news and there are 12 in /en/, 
   the 11th will be shown in english.  Now, if the 11th file in your 
   folder is the translation of the 12th file in /en/, it will be 
   displayed wrong

6. If you have CVS access, then commit your changes to the site. See the Website Editing and Working With CVS documentation for directions.

If you do not have CVS access, then show your translation to one of the Inkscape administrators for review. They will then give you access to CVS and the website, so you can deploy your changes.

There are no UTF-8 entities !!!

As i heared different people talking about UTF-8 entities, i thought this should be clarified: THERE IS NO SUCH THING!

There are HTML entities. (that's what you think of) This is not an encoding, it is a (somewhat) human readable transliteration. They look like

 & (& a m p ;) --- ř (& # 3 4 5 ;) --- Ä (& A u m l ;)

The cool thing about them is, that you don't need to care about encoding with them, as only the lower 128 of 256 ASCII-Characters are used to describe characters that normally are in the upper 128 or even don't exist in ASCII. The upper 128 are different, for example in Windows codepages or whatever, at least they are system dependant.

Now, if we talk about UTF-8, this is an encoding! And it's one for UNIcode. The 8 means, that the most important chars need 8bit to store. (i think these are the same chars as the lower 128 in ASCII) All the other UNIcode chars are stored using 2, 3 or 4 bytes. And if your editor is not capable of UTF-8, youll see a mess instead of special chars like äüößéńí etc.

So, if you edit existing pages, you need to have an UTF-8 capable editor. (Kate for example is capable, but you might need to check the encoding in the extras menu.)

Please do not use HTML-entities! We should all use the same system, which should be utf-8 encoding. If you have questions about this, please ask.

Reference: HTML Entities: http://www.w3schools.com/tags/ref_entities.asp