Giter Club home page Giter Club logo

Comments (4)

GoogleCodeExporter avatar GoogleCodeExporter commented on September 10, 2024
The exceptions thrown by LightOpenID are intended for programmers using the 
library. You should catch them and then report them to the user.

While documenting them may be a good idea, I see no point in adding i18n 
support.
By the way, you probably mean internationalization (i18n), not localization 
(l10n).

Original comment by [email protected] on 9 Apr 2011 at 12:07

  • Changed state: WontFix
  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

from lightopenid.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 10, 2024
Also, I've just noticed that LightOpenID forwards curl errors as exceptions if 
there are any, so it's not even possible to provide i18n for them.

Original comment by [email protected] on 9 Apr 2011 at 12:16

from lightopenid.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 10, 2024
Oh, I thought the exceptions were for the user. I should probably read 
http://www.php.net/manual/en/language.exceptions.php and 
http://www.php.net/manual/en/class.exception.php

At the moment, I use this code-structure:
try {
    [OpenID-related code, just like in the example]
} catch(ErrorException $e) {
    echo $e->getMessage();
}

As my users are more likely to be able to understand German than English, 
should I use a structure like this:
try {
    [OpenID-related code, just like in the example]
} catch(ErrorException $e) {
    switch($e->getCode()){
        catch 0:
            echo "My error-message in german.";
            break;
        catch 1:
            echo "Another translated error message.";
            break;
        default:
            echo $e->getMessage();
    }
}

> By the way, you probably mean internationalization (i18n), not localization 
(l10n).
Oh, thanks for the hint. Yes, I ment i18n.

This enhancement can be closed.

By the way, how can I submit Enhancements? I can't see any way to set the 
Priority or the Type of a bug.

Original comment by [email protected] on 11 Apr 2011 at 6:38

from lightopenid.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 10, 2024
Apparently, people who are not project members can't submit issues with labels, 
and I can't change it anywhere (according to 
http://code.google.com/p/support/wiki/Permissions). That's not a big problem 
though, since I label the issue correctly when I answer anyway.

Original comment by [email protected] on 11 Apr 2011 at 10:01

from lightopenid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.