Sophie

Sophie

distrib > Fedora > 16 > x86_64 > media > updates-src > by-pkgid > 977f933993f25e7864760f49fc647ed6 > files > 5

virtaal-0.7.1-1.fc16.src.rpm

%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

#%global         subrelease rc1

Name:           virtaal
Version:        0.7.1
Release:        1%{?dist}
#Release:        0.4.%{subrelease}%{?dist}
Summary:        Localization and translation editor

Group:          Development/Tools
License:        GPLv2+
URL:            http://translate.sourceforge.net/wiki/virtaal/index
# Final releases are found at this URL
Source0:        http://sourceforge.net/projects/translate/files/Virtaal/%{version}/%{name}-%{version}.tar.bz2
# Snapshot releases are found at this URL
#Source0:        http://translate.sourceforge.net/snapshots/%{name}-%{version}-%{subrelease}/%{name}-%{version}-%{subrelease}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Patch0:         virtaal-0.7.1-setup_drop_MO_generation.patch
Patch1:         virtaal-0.3.0-autocorr_shared_location.patch
Patch2:         virtaal-0.7.0-packaged.patch

BuildArch:      noarch
BuildRequires:  python
%if 0%{?fedora} >= 14
BuildRequires:  python2-devel
%else
BuildRequires:  python-devel
%endif
BuildRequires:  desktop-file-utils
BuildRequires:  gettext
BuildRequires:  intltool
Requires:       translate-toolkit >= 1.9.0
Requires:       pygtk2
Requires:       pygtk2-libglade
%{?fedora:Requires:       pygobject2}
Requires:       python-lxml
# Virtaal lists the following as optional packages
# gnome-python2-gtkspell Needed for spell checking
Requires:       gnome-python2-gtkspell
# libtranslate provides access to various MT platforms
%{?fedora:Requires:       libtranslate}
# python-Levenshtein provides fast distance measures
Requires:       python-Levenshtein 
# python-psycopg2 needed for TinyTM
Requires:       python-psycopg2
# Virtaal speedup
%ifarch %{ix86}
%{?fedora:Requires:       python-psyco}
%endif
# python-pycurl needed for open-tran.eu
Requires:       python-pycurl
# python-simplejson needed for google-translate and tmclient
Requires:       python-simplejson
Requires:       xdg-utils


%description
A program for Computer Aided Translation (CAT) and localization.

Virtaal includes features that allow a localizer to work effectively including:
syntax highlighting, autocomplete and autocorrect.  By showing only 
the data that is needed through its simple and effective user interface it
ensures that translators can focus on their current translation task.

A rich set of Translation Memory (TM) plugins provide valuable suggestions to
the translator from sources such as Open-Tran.eu, the current file, and the 
translators own TM server.  Similarly Machine Translation (MT) suggestions can 
come from Apertium, libtranslate, Google and Moses.

The terminology plugin system will provide terminology hints from Open-Tran.eu,
local terminology files and remote terminology repositories.

Placeholders such as variables, abbreviations, URLs, emails and special 
punctutions are highlighted for easy insertion into the translations.

Virtaal is able to edit any of the following formats: XLIFF, Gettext PO and 
.mo, Qt .ts, .qph and .qm, Wordfast TM, TMX, OmegaT glossaries and TBX. The 
Translate Toolkit converters allow translators to edit: OpenDocument 
Format (ODF), OpenOffice.org SDF, Java (and Mozilla) .properties, Mozilla 
DTD files, subtitles, and other formats.


%prep
# Final release setup
%setup -q
# Snapshot setup
#%setup -q -n %{name}-%{version}-%{subrelease}
%patch0 -p1 -b .setup_drop_MO_generation
%patch1 -p1 -b .autocorr_shared_location
%patch2 -p1 -b .packaged

%build
%{__python} setup.py build
./maketranslations %{name}
pushd po
egrep -v "^#" LINGUAS | while read lang
do
    mkdir -p locale/$lang/LC_MESSAGES/
    msgfmt ${lang}.po --output-file=locale/$lang/LC_MESSAGES/%{name}.mo
done
popd
# Remove leading space to try optimise IO in loading
sed -ir "s/^\s*?//" share/virtaal/virtaal.glade


%install
rm -rf %{buildroot}
%{__python} setup.py install -O1 --skip-build --install-data=/usr --nodepcheck --root %{buildroot}


desktop-file-install    %{?rhel:--vendor=""}             \
   --delete-original                                     \
   --dir=%{buildroot}%{_datadir}/applications            \
   %{buildroot}%{_datadir}/applications/%{name}.desktop

cp -rp po/locale %{buildroot}%{_datadir}/
%find_lang %{name}

rm -rf %{buildroot}%{_datadir}/virtaal/autocorr

pushd %{buildroot}%{_datadir}/icons/hicolor
    for size in $(ls -d *)
    do
        pushd $size/mimetypes
        ext=png
        if [ "$size" == "scalable" ]; then
            ext=svg
        fi
        for mimetype in \
               text-x-gettext-translation \
               text-x-gettext-translation-template \
               application-x-xliff+xml application-x-xliff \
               text-x-wordfast
        do
            ln -s x-translation.$ext $mimetype.$ext
        done
        popd
    done
popd


%post
update-desktop-database &> /dev/null || :
update-mime-database %{_datadir}/mime &> /dev/null || :
touch --no-create %{_datadir}/icons/hicolor &> /dev/null || :


%postun
update-desktop-database &> /dev/null || :
update-mime-database %{_datadir}/mime &> /dev/null || :
if [ $1 -eq 0 ] ; then
    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi


%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :


%clean
rm -rf %{buildroot}


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc README LICENSE po/*.pot
%{_bindir}/*
%{_datadir}/applications/*
%{_datadir}/mime/packages/*
%{_datadir}/virtaal
%{_datadir}/icons/hicolor/*/mimetypes/*
%{_datadir}/icons/virtaal.*
%exclude %{_datadir}/icons/x-translation.ico
%{python_sitelib}/*


%changelog
* Mon Jan 9 2012 Dwayne Bailey <dwayne@translate.org.za> - 0.7.1
* Update to 0.7.1 final
    - New and updated translations
    - Support for Drag and Drop into the Virtaal window (bug 1955)
    - Improvements to the Moses machine translation plugin
    - Search highlighting sometimes incorrect (bug 1944)
    - Some improvements towards fixing bug 1789 (also search highlighting)
    - Some performance improvements (search and startup time)
    - Reduced memory use in long sessions
    - Support for non-ASCII installation paths
    - Support for non-ASCII usernames (bug 2000) [reported by Zbyněk Schwarz] 

* Sat Oct 1 2011 Dwayne Bailey <dwayne@translate.org.za> - 0.7.1-0.4.rc1
- Use official 0.7.1 rc1 tarball
- Patch: drop Greek

* Wed Sep 28 2011 Dwayne Bailey <dwayne@translate.org.za> - 0.7.1-0.3.rc1
- Only install languages from the LINGUAS file
- Patch: install Greek

* Mon Sep 26 2011 Dwayne Bailey <dwayne@translate.org.za> - 0.7.1-0.2.rc1
- Update to 0.7.1 rc1
   - New Greek translation [Dimitris Spingos]
   - Reduce memory use
   - Improved startup time
   - Support for non-ASCII installation paths
   - Support for non-ASCII usernames (bug 2000) [reported by Zbyněk Schwarz]

* Fri Jul 22 2011 Dwayne Bailey <dwayne@translate.org.za> - 0.7.1-0.1.beta1
- Update to 0.7.1 beta1
   - Updated translations, including Faroese and Portuguese
   - Support for Drag and Drop into the Virtaal window (bug 1955)
   - Search highlighting sometimes incorrect (bug 1944)
   - Some improvements towards fixing bug 1789 (also search highlighting)
   - Small performance improvements, especially in search.
   - Better XML tags test (bug 1971)
   - Corrected plural form for Scottish Gaelic
- Update patch: setup_drop_MO_generation

* Fri Jun 3 2011 Dwayne Bailey <dwayne@translate.org.za> - 0.7.0-1
- Update to 0.7.0 final
- Patches: remove no_depcheck, no_profiling. Add packaged

* Sat May 28 2011 Dwayne Bailey <dwayne@translate.org.za> - 0.7.0-0.9.rc2
- Update to 0.7.0 rc2
   - Virtaal hanging when inserting placeable - Virtaal bug 1930
   - Improved visual contrast and theme compliance in the diffing colours. Virtaal bug 1934
   - Updated translations 
- Drop threading patch

* Fri May 20 2011 Dwayne Bailey <dwayne@translate.org.za> - 0.7.0-0.8.rc1
- Update to 0.7.0 rc1
   - Export .po files to .mo 
   - Updated translations 
   - Fix Google and Microsoft translator for some languages 
   - Some accessibility improvements 
   - Fix some drawing issues with native dialogues
- Fix threading

* Tue May 10 2011 Dwayne Bailey <dwayne@translate.org.za> - 0.7.0-0.7.beta5
- Fix profile disabling patch - bug #701224

* Wed Apr 20 2011 Dwayne Bailey <dwayne@translate.org.za> - 0.7.0-0.6.beta5
- Disable profiling option - not useful in production
- Try to optimise glade by removing leading space
- Drop patch for rhbug #675623 - pt spell checking

* Sun Apr 17 2011 Dwayne Bailey <dwayne@translate.org.za> - 0.7.0-0.5.beta5
- Update to 0.7.0 beta5

* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.1-7
- Fix bug #675623 - pt uses pt_BR instead of pt_PT for spell checking

* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Fri Jan 22 2011 Dwayne Bailey <dwayne@translate.org.za> - 0.7.0-0.4.beta4
- Patch no_depcheck - don't perform dependency checks

* Thu Jan 20 2011 Dwayne Bailey <dwayne@translate.org.za> - 0.7.0-0.3.beta4
- Require translate-tools >= 1.9.0

* Thu Jan 20 2011 Dwayne Bailey <dwayne@translate.org.za> - 0.7.0-0.2.beta4
- Update to 0.7.0 beta4

* Tue Jan 11 2011 Dwayne Bailey <dwayne@translate.org.za> - 0.7.0-0.1.beta3
- Update to 0.7.0 beta3
- Remove patch for bug 611751

* Fri Jul 23 2010 Dwayne Bailey <dwayne@translate.org.za> - 0.6.1-5
- Install .desktop in a RHEL/Fedora neutral way

* Fri Jul 23 2010 Dwayne Bailey <dwayne@translate.org.za> - 0.6.1-4
- Fix libtranslate patch offset

* Fri Jul 23 2010 Dwayne Bailey <dwayne@translate.org.za> - 0.6.1-3
- Fix bug #611751 - fix error reporting in libtranslate

* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.6.1-2
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Mon Jun 7 2010 Dwayne Bailey <dwayne@translate.org.za> - 0.6.1-1
- Updates to 0.6.1
   - Support for selecting placeables from the plural in the source
   - Support for selecting the whole source after moving through all placeables
   - Instability in the plugin preferences (#1448)
   - Fixed an occasional crash caused by Tabing from navigation (#869)
   - Assume cancel if file confirmation is closed (#1453)
   - Work around GNOME bug 569581 (Windows US intl layout, Afrikaans 'n)
   - Correct display of welcome screen when opening broken files (#1433)
   - Fixed some GTK warnings
   - Correctly handle all open-tran.eu errors (#1355)
   - Correct colours on the language pop-up button (#1424)
   - Fix incorrect text selection during search (#1474)
   - Some fixes to the Italian translation
   - New translation: Thai

* Fri Apr 23 2010 Dwayne Bailey <dwayne@translate.org.za> - 0.6.0-1
- Updates to 0.6.0
   - Support for seeing alt-trans tags in XLIFF files as suggestions
   - Support for Microsoft Translator and new Apertium service
   - Support for proxy servers
   - Support for OmegaT glossary files
   - A more useful welcome area in the main application area
   - Accessibility improvements
   - Better compliance with system themes
   - New translations: Bulgarian, Icelandic
- Drop OpenTran XMLRPC bug #1355
- Drop TMController fixes bug #1388

* Thu Mar 25 2010 Dwayne Bailey <dwayne@translate.org.za> - 0.5.2-3
- Backport TMController fix (bug #1388)

* Sat Feb 20 2010 Dwayne Bailey <dwayne@translate.org.za> - 0.5.2-2
- Actualy commit the XMLRPC fix
- Ensure we build with python2

* Fri Jan 29 2010 Dwayne Bailey <dwayne@translate.org.za> - 0.5.2-1
- Update to 0.5.2
   - Correctly package the lookup plugin that was missing before
   - Draw the user's attention if the language pair isn't specified
   - Keep track of window sizes and maximisation state
   - New autocorrect file for Lithuanian
   - New translations: Belarusian, Akan, Polish, Asturian, Japanese, Punjabi
   - Several small bug fixes and improvements
- Backport OpenTran XMLRPC errors (bug #1355)

* Sat Dec 26 2009 Dwayne Bailey <dwayne@translate.org.za> - 0.5.1-1
- Update to 0.5.1
   - Fixed URI-handling bug for opening files.
   - New translations: Chinese (Taiwan) and Lithuanian.

* Thu Dec 3 2009 Dwayne Bailey <dwayne@translate.org.za> - 0.5.0-1
- Update to 0.5.0 final
   - Correctly support Open-Tran for languages with regional modifiers
   - Web requests now accept compressed responses if the server offers it
   - New translations: Ukrainian.
   - Various bug fixes
- Drop Korean translation fix

* Tue Dec 1 2009 Dwayne Bailey <dwayne@translate.org.za> - 0.5.0-0.2.rc1
- Typo in postun

* Fri Nov 27 2009 Dwayne Bailey <dwayne@translate.org.za> - 0.5.0-0.1.rc1
- Update to 0.5.0 rc1
   - Autoterm: Virtaal can now automatically download terminology files
   - Web look-up: select text and and look it up on a web site
   - Highlighting of differences in non-100% TM matches
   - Language detection to aid in correct choice of language pair
   - Informative error handling when adding terms
   - New plugins for machine translation with Google and Moses
   - New translations: Northern Sotho, Sotho, Songhai, Korean
   - Many updated translations
   - Various bugfixes.
- Update MO generation patch
- Fix a msgfmt compile error in Korean translations

* Fri Oct 16 2009 Dwayne Bailey <dwayne@translate.org.za> - 0.4.1-1
- Update to 0.4.1
   - New translations: Turkish, Finnish, Vietnamese
   - Updated translations: Russian, Dutch and Zulu
   - More complete handling of "recent files" (bug 1120)
   - Better alignment with the GNOME human interface guidelines (bug 1095)
   - More reliable ways of obtaining the default font settings (bug 1092)
   - Better handling of HTML tags in the Apertium MT module
   - Small layout improvements (bug 1045, 1138)
- Depend on Translate Toolkit 1.4.1 for fixes to XLIFF, placeable and tmserver

* Wed Aug 5 2009 Dwayne Bailey <dwayne@translate.org.za> - 0.4.0-1
- Update to 0.4.0 final
  - Terminology suggestions
  - Syntax highlighting
  - Support for "placeables" or placeholders
  - Support for editing inline elements of XLIFF files
  - Improvements to preferences
  - Updated translations.
  - Improvements for right-to-left languages.

* Fri Jul 31 2009 Dwayne Bailey <dwayne@translate.org.za> - 0.4.0-0.3.rc2
- Update to 0.4.0 rc2:
  - More improvements to the RTL interface of Virtaal
  - Bugfixes relating to undo and editing XLIFF inline elements 

* Fri Jul 24 2009 Dwayne Bailey <dwayne@translate.org.za> - 0.4.0-0.2.rc1
- Update to 0.4.0 rc1:

  Improvements since beta 1:
   - User interface improvements, including 
     - better English text
     - better display on small screens
     - better display in right-to-left languages
     - updated translations: af, ar, de, en_GB, en_ZA, eu, fr, gl, nl, pt_BR, ru
   - Fonts are now configurable
   - You can select to which file a new term should be added
   - Improvements to comments, including making them selectable
   - Updated tutorial
   - Handling of inline elements in XLIFF

- Drop --nodepcheck patch

* Tue Jun 30 2009 Dwayne Bailey <dwayne@translate.org.za> - 0.4.0-0.1.beta1
- Update to 0.4.0 beta1
- Backport r11846 --nodepcheck

* Wed Apr 15 2009 Dwayne Bailey <dwayne@translate.org.za> - 0.3.1-3
- Update icon installation to latest Fedora guidelines

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Wed Feb 18 2009 Dwayne Bailey <dwayne@translate.org.za> - 0.3.1-1
- Update to 0.3.1 release
- Package icons

* Sat Feb 14 2009 Dwayne Bailey <dwayne@translate.org.za> - 0.3.0-3
- Use platform autocorrect files

* Sat Feb 14 2009 Dwayne Bailey <dwayne@translate.org.za> - 0.3.0-2
- Update to F-10:
  - Correct dependency python-psycopg2
  - Update to 0.3 final
  - Add pycurl, libtranslate, psycopg2 for various TM plugins

* Tue Feb 3 2009 Dwayne Bailey <dwayne@translate.org.za> - 0.3-0.2.rc1
- Update for 0.3-rc1
- Remove version patch

* Thu Jan 22 2009 Dwayne Bailey <dwayne@translate.org.za> - 0.3-0.1.beta1
- Update for 0.3-beta1 release
- Refresh MO setup patch
- Add version patch to prevent dependency on Translate Toolkit 
  when building

* Wed Jan 7 2009 Dwayne Bailey <dwayne@translate.org.za> - 0.2-3
- vendor tag is needed for desktop-file-install

* Sat Dec 6 2008 Dwayne Bailey <dwayne@translate.org.za> - 0.2-2
- Cleanups from package review

* Thu Oct 16 2008 Dwayne Bailey <dwayne@translate.org.za> - 0.2-1
- Build for final 0.2 release
- Add pygtk2-libglade dependency

* Thu Oct 2 2008 Dwayne Bailey <dwayne@translate.org.za> - 0.2-0.3.rc1
- Rebuild after tarball restructuring

* Wed Oct 1 2008 Dwayne Bailey <dwayne@translate.org.za> - 0.2-0.2.rc1
- Fix file locations

* Wed Oct 1 2008 Dwayne Bailey <dwayne@translate.org.za> - 0.2-0.1.rc1
- Update to RC1

* Sat Sep 20 2008 Dwayne Bailey <dwayne@translate.org.za> - 0.1-12
- Include LICENSE

* Thu Sep 11 2008 Dwayne Bailey <dwayne@translate.org.za> - 0.1-11
- Update for various file moves.
- Package virtaal.pot and gtk+-lite.pot
- Exclude the de_DE.mo debug translations

* Sat Jul 26 2008 Dwayne Bailey <dwayne@translate.org.za> - 0.1-10
- Package autocorrect files

* Thu Jul 24 2008 Dwayne Bailey <dwayne@translate.org.za> - 0.1-9
- Rebuild after upstream data location changes

* Tue Jun 3 2008 Dwayne Bailey <dwayne@translate.org.za> - 0.1-8
- Rebuild for fc9

* Fri May 9 2008 Dwayne Bailey <dwayne@translate.org.za> - 0.1-8
- Add xdg-utils as a requirement as we are using xdg-open

* Wed May 7 2008 Dwayne Bailey <dwayne@translate.org.za> - 0.1-7
- Adjust to changes in source package

* Wed Apr 30 2008 Dwayne Bailey <dwayne@translate.org.za> - 0.1-6
- Adjust to changes in source package

* Thu Apr 17 2008 Dwayne Bailey <dwayne@translate.org.za> - 0.1-5
- Install icon

* Thu Apr 17 2008 Dwayne Bailey <dwayne@translate.org.za> - 0.1-4
- Build translatable files using intltool

* Mon Apr 14 2008 Dwayne Bailey <dwayne@translate.org.za> - 0.1-3
- Install translations

* Sat Apr 12 2008 Dwayne Bailey <dwayne@translate.org.za> - 0.1-2
- Executable s/run_virtaal.py/virtaal/
- Remove .glade movement, ./setup.py install it correctly now
- Install .desktop, locale, mime files
- Update desktop- and mime-database

* Sat Apr 5 2008 Dwayne Bailey <dwayne@translate.org.za> - 0.1-1
- Initial packaging