Code Monkey home page Code Monkey logo

lin-xcode5's People

Contributors

jasonhotsauce avatar nek023 avatar spacyricochet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lin-xcode5's Issues

Filter content depending on caret position

Currently Lin shows not only the full match of a key but everything that matches even partially. I use keys like "AP1", "AP343" etc. (have more than 500 already). That means when I have a line with the key "AP1" I get matches for all entries that start with "AP1", regardless where the mouse cursor is (e.g. "AP10", "AP11", AP112" etc.). This is just a waste of bandwidth and space. It would be useful when shown while the key is being typed, but not if I just want to see what the key is by setting the caret anywhere on that line.

So my wish is to do partial matching only when typing the key and otherwise full matching.

Simplify Lin

I like the idea of Lin. And the popup window is really cool. But I think Lin should try to do less in my opinion.

I think Lin should works similar to KSImageNamed: When I try to use NSLocalizedString(), It will show us an auto-complete menu of Localised Strings. If we input a string that do not exist in the current Strings file, It will create those localise strings place holder for us; Showing a popup menu in the editor will block our workflow from typing code, and causing more bugs which make it harder to fix.

Swift Support

Hi
It is not working on Swift,
I tried with: NSLocalizedString("", comment: "") and nothing happens.

A crash bug (I don't know how to define the title)

First,press "@" at one method body and xcode will show you all things match this character,then select one but not string.Xcode will remember what you select before.

Second,delete the code and input NSLocalizedString,tab on the "key" placeholder and press "@",then you can see xcode select what you selected at first step.Use the direction key to select string,and it will crash.

Crash on code-completion

A crash (moved from Xcode4-Lin) happens in Xcode5.1.1 (installed via Alcatraz):
-> NSLocalizedString (@""
-> Lin appears
-> arrow right
-> Lin disappears
-> code completion appears
-> arrow left
-> Xcode crashes

provisioning profiles error

i am an ios developer and don't have a mac developer subscription and i am unable to install the plugin. it gives a code signing error stating i need to have a mac developer subscription. is this a bug or can the plugin only be used by mac devs?

here is a screenshot http://grab.by/qMwi

Is this plugin really work?

I use Xcode 5.1 (5B130a). After installing Lin in the directory ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins and restart Xcode I did not see any menu!!!

Customized Macro?

I use a special macro which has the same argument order as NSLocalizedString(key, comment)... how can I tell Lin to use my custom macro (_ls(key, comment)) instead?

Can not show in menu list

I downloaded and built successfully, but can not find it in menu list.

During build, there're errors below:

2013-11-20 07:03:16.540 Xcode[671:303] [MT] DVTAssertions: Warning in /SourceCache/IDEKit/IDEKit-3608/Framework/Classes/WelcomeWindow/IDELaunchServicesRegistrationHelper.m:115
Details: Failed to register '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Applications/Printer Simulator.app' with Launch Services, error code: -10811.
Object: <IDELaunchServicesRegistrationHelper: 0x60000000f540>
Method: -_registerPathWithLaunchServices:
Thread: <NSThread: 0x60000006f3c0>{name = (null), num = 1}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
2013-11-20 07:03:17.116 Xcode[671:1003] DeveloperPortal: Using pre-existing current store at URL (file:///Users/bournewang/Library/Developer/Xcode/DeveloperPortal%205.0.2.db).
2013-11-20 07:03:17.484 Xcode[671:303] [MT] PluginLoading: Required plug-in compatibility UUID 37B30044-3B14-46BA-ABAA-F01000C27B63 for plug-in at path '/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Unity4XC.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2013-11-20 07:03:17.508 Xcode[671:303] BBUncrustifyPlugin (V1.0.4) loaded
2013-11-20 07:03:17.602 Xcode[671:303] Lin v2.0 was successfully loaded.
2013-11-20 07:03:17.634 Xcode[671:303] FuzzyAutocomplete: Plugin loaded
2013-11-20 07:03:17.635 Xcode[671:303] [MT] PluginLoading: Required plug-in compatibility UUID 37B30044-3B14-46BA-ABAA-F01000C27B63 for plug-in at path '
/Library/Application Support/Developer/Shared/Xcode/Plug-ins/DLAutoresizeMaskPlugin.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2013-11-20 07:03:17.652 Xcode[671:1003] Shell command execution failed! working directory doesn't exist.
2013-11-20 07:03:17.653 Xcode[671:1003] Git fetch output: (null)
2013-11-20 07:03:17.665 Xcode[671:1003] Alcatraz update failed! Error Domain=working directory doesn't exist. Code=667 "The operation couldn’t be completed. (working directory doesn't exist. error 667.)"
2013-11-20 07:03:20.641 Xcode[671:303] [MT] DVTAssertions: Warning in /SourceCache/DTDeviceKit/DTDeviceKit-3697/DTDeviceKitBase/DTDeviceKitBase_Utilities.m:503
Details: Failed to register "/System/Library/CoreServices/CoreTypes.bundle/Contents/Library/MobileDevices.bundle" with Launch Services, error code: -10811.
Function: __RegisterUTIsIfNeeded_block_invoke
Thread: <NSThread: 0x60000006f3c0>{name = (null), num = 1}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
2013-11-20 07:03:22.244 Xcode[671:303] [MT] IDESourceControlAuthentication: Couldn't remove password from keychain: Error Domain=DVTSecErrorDomain Code=-25300 "The specified item could not be found in the keychain." UserInfo=0x608005c7d7c0 {NSLocalizedDescription=The specified item could not be found in the keychain.}

Crash when auto-complete

When I auto-complete NSLocalizedString(), type @, want to choose the @"" by tapping on the up arrow keyboard key. (The auto-complete is located on @() ) It's will crash my Xcode 5.

Thanks for your plugin.

Pop up showing empty

I messed up one of my project's xcodeproj file and recreated again but now lin is showing pop up empty I can't even select a Localizable file. The strange thing is that while in other projects works fine if I start the one that doesn't work and show the Lin pop-up it won't work in any project until I close xcode and re-open it again
captura de pantalla 2014-06-12 a la s 23 10 45

Localizable.strings can't contain comments

Fails to properly parse existing entries in Localizable.strings files that contain comments.

Patch LNLocalizationCollection.m, reloadLocalizations:

  1. regular expression ending ";$ better ending ";(.*)$ to allow any characters after terminator, before line ending.
  2. change the line:
    if (result.range.location != NSNotFound && result.numberOfRanges == 5) {
    to:
    if (result.range.location != NSNotFound && result.numberOfRanges >= 5) {
    because firstMatchInString: may return a range (no. 6) for the comments.

can not see +/- button in popup window

You can add a new localization or remove a localization from the popover.
(Click +/- button in the bottom left of the popover.)

I'm using macbookpro with retina on Xcode 5.0.2(5A3005) Mac OS 10.9.1.

Please add language filtering button

It will be great to add language filtering menu/button (at least for "en") to show only filtered languages. This is especially useful when you have a lot of language translation already, that you don't want the same key occupy the popup window while typing.

apple's recommended format for localization files is UTF16, any plans to support that

From the Docs

Note: It is recommended that you save strings files using the UTF-16 encoding, which is the default encoding for standard strings files. It is possible to create strings files using other property-list formats, including binary property-list formats and XML formats that use the UTF-8 encoding, but doing so is not recommended. For more information about the standard strings file format, see “Creating Strings Resource Files.” For more information about Unicode and its text encodings, go to http://www.unicode.org/ or http://en.wikipedia.org/wiki/Unicode.

are there any plans to support UTF16, or is there any particular reason Lin works with UTF8 only?

Cannot enable Lin Xcode 5.1

Hi,
I have installed xcode 5.1 (final release) then I install Lin successed.
But when xcode restart I can not see Lin item in the Editor menu.
screen shot 2014-03-12 at 10 39 50 am

Please check it, thanks

Support for comment before key-value

Hi and thanks for a great plug-in :)

All our strings has a comment, which is put before the key-value definition, e.g., an example copied from the internet:

/* Insert new contact button */
"contact-editor.insert-new-contact-button" = "Insert contact";
/* Delete contact button */
"contact-editor.delete-contact-button" = "Delete contact";

The comment is important for translators to support the context of the string.

Would it be possible to support these comments in Lin?

  • Lin should parse the string-files as usual but also extract the comment text. This text should be shown where it makes sense.
  • When adding a new string the dialog should have a field to enter a comment. The comment should be written to the string-file.
  • It should be possible to edit the comment in Lin's UI and then Lin should update the string-file accordingly.

If this becomes possible then developers should use the below macro with nil to the comment field. But then Lin should show the comment from the string-file.

NSLocalizedString(@"contact-editor.insert-new-contact-button", nil)

I understand my request requires great effort. But I haven't tried to make/modify an Xcode plug-in before. But if you can give me some hints of how to run/debug/test then plug-in while developing it it would be appreciated much and also some pointers where in your code I should look at :)

Thanks again :)

It freezes Xcode on indexing

I really like it, unfortunately I have to remove it from my xcode plugin since it freezes xcode every time on indexing. I am not sure if it just happens to me, but after removing it Xcode doesn't freeze anymore.

Issue of writing Old-Style ASCII Property Lists

Some of our .strings files are in Old-Style ASCII Property Lists format which is also supported by XCode. If we use Lin plugin to add missing translation during development, the new translation is added to the wrong place, result in bad-syntax format.

The "Old-Style ASCII Property Lists" only have minor difference from regular one. For example, the regular one looks like:

"Insert Element" = "Insert Element";
"ErrorString_1" = "An unknown error occurred.";

The "Old-Style ASCII Property Lists" only add two more chars:

{
"Insert Element" = "Insert Element";
"ErrorString_1" = "An unknown error occurred.";
}

You only need to make sure the new string is added before the final '}' char, and we are done.

Despite the "Old-Style ASCII Property Lists" has ASCII in name, an UTF8 encoded file is perfectly fine.

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.